How to get the previous page name
Last Post 01/18/2008 9:52 AM by Joseph Craig. 3 Replies.
Author Messages
Paul Wade
Nuke Active Member
Nuke Active Member
Posts:31


--
01/16/2008 4:09 AM  
I have a module that can be accessed from a number of different pages.

Is there a way of getting the previous page name that we navigated from?

Any help appreciated.

Regards,

Paul.
Joseph Craig
DNN MVP
Posts:11667


--
01/17/2008 1:40 PM  
You might be able to try something like this (which I found by googling and I have not tried!):

void Page_Load(...)
{
if( !IsPostBack )
{
ViewState["ReferrerUrl"] = Request.UrlReferrer.ToString()
}
}

void returnToSender()
{
object referrer = ViewState["ReferrerUrl"];
if(referrer != null)
Response.Redirect((string)referrer);
else
Response.Redirect("Default.aspx");
}

Joe Craig, Patapsco Research Group
Complete DNN Support
Paul Wade
Nuke Active Member
Nuke Active Member
Posts:31


--
01/18/2008 5:02 AM  
Hi Craig,

Thanks for your help.

Is there a DotNetNuke function that extracts the parameter key pairs from a friendly dnn url?

eg. http://localhost/isoverps/Productio...fault.aspx

Using UrlReferrer is there a dnn function that would return 103 for 'tabid' ?

Any help appreciated.

Regards,

Paul.
Joseph Craig
DNN MVP
Posts:11667


--
01/18/2008 9:52 AM  
While I think it's a tad out of date, this website (http://classbrowser.subzero-solutio...home.aspx) is a nice resource for exploring the DotNetNuke classes, etc.

I probably would parse the URL string and look for what comes between the two / following "tabid" in the URL.

Joe Craig, Patapsco Research Group
Complete DNN Support


---