Link to home
Start Free TrialLog in
Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America

asked on

go to url of page I just came from

In asp.net c# how do I programmatically go back to the page I just came from?

On any page, how do I obtain the URL of the page?  (what is in the address bar)
ASKER CERTIFIED SOLUTION
Avatar of Guru Ji
Guru Ji
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tom Knowlton

ASKER

This is what I meant, which I think you did answer above:

Page A:

            string thisPage = Request.UrlReferrer.ToString();
            Session["afa_parent"] = thisPage;
            Response.Redirect(***Page B url***);


Page B ( on click "cancel" ):

            string prevPage = Session["afa_parent"].ToString();
            Response.Redirect(prevPage);