Posted on: 12/12/2013 2:28:11 PM | Views : 1062

I have a page with a link that can go to a second page.  
On the second page there is a "Back" button.
I have a code behind for the second page that has a pageLoad sub that gets the correct URL Referrer "pageone.aspx" and sets a variable to that value.
I have a sub for the "Back" button that has response.redirect("~/" + variable).
However when the button gets clicked the page "posts back" and the page load runs again so that the URL Referrer is now "pagetwo.aspx" and the button redirects the page to the same page.
I can hardcode the response.redirect and it works but the second page can be accessed from multiple pages and should return to the referring page.

Has anyone out there come across this problem?

Go to the complete details ...