Use Request.UrlReferrer to get an uri to the page that referred to the
current page. If you use this on a page that will perform postbacks you
will have to get the referrer url if(!IsPostBack) and store it in the
viewstate. Otherwise the referrer information will be lost after the
first postback.
Use Context.Request.UrlReferrer if you are making a custom web control
and not code behind for a page.
/Hugo
KK wrote:
In ASP.NET is it possible to get the name of the
previous page? for example,
Page1.aspx
Page2.aspx
From page1.aspx, I do a Server.Transfer(Page2.aspx),
Now within Page2.aspx can I get the name of Page1.aspx
(the previous page who called page2.aspx) ?