Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

asked on 

Previous Page's URL

Environment: Visual Studio 2019, ASP.NET and C#
Hello,
Requirement: I have a page, which can be called from couple of web pages.  I need to return to the (Response.Redirect) page from where it was called by clicking a Back button.  

Possible soultion:  So I am retriving the called page URL by using CalledPageURL = Page.Request.UrlReferrer.ToString().  The value I retrivie is http://localhost:62000/Home.aspx. Now I need to save this value, so that it would not get refreshed (null) during page Post Back (IsPostBack).

I am trying to use Session variable or ViewState options.  But both of them are not working. They save the value successfully.  But I try to retrive the vallue, I am getting null exception. Please let me know how to fix it.

Thank you in advance.
ASP.NET.NET ProgrammingC#

Avatar of undefined
Last Comment
RadhaKrishnaKiJaya

8/22/2022 - Mon