In asp.net its much handier to have this function so that you could go to the previous page specially, if the user could reach a perticular page from a whole range of links...
I know there are a zillion ways to do this, including javascript and all...but this is my fav one...
Works most of the time.....
string sPreviousURL;
sPreviousURL = Request.ServerVariables["HTTP_REFERER"];
GoBackToPreviousPage.Text = string.Format("<a href='{0}'>Click Here to go
back to Previous Page</a>", sPreviousURL);
The only time this wont work is when a person opens the link directly in a tab...
Lemme plan and put some cases around there...
No comments:
Post a Comment