Click here to Skip to main content
15,904,351 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
HI!
I have a web page Test.aspx having two button of next and back on it. I redirect to this page (Test.aspx) from multiple pages. I want to define a flag that when i click to back button this page shuld be redirected to the respective page. For this purpose, i had used session but it didn't work out. Please guide me how can a define a flag to cope with situation like this.
Thanks
Posted

you ca pass the parameters to the page using querystring
eg
C++
Response.Redirect("Test.aspx?blnFlag=true", false);


and retrieve the value like

C++
if (Request.QueryString["blnFlag"] != null && Request.QueryString["blnFlag"].Equals("true"))
{
//Do whatever you want
}
 
Share this answer
 
Comments
Ed Nutting 9-May-11 2:24am    
Good answer, my 5 :)
DipaliKolhe 9-May-11 2:26am    
Thanks :)
touseef4pk 9-May-11 2:31am    
I forgot to mention one thing that i am not allowed to use query string here. So i didn't go for that solution. Is there else pretty good secure solution?
I forgot to mention one thing that i am not allowed to use query string here. So i didn't go for that solution. Is there else pretty good secure solution?
 
Share this answer
 
Comments
DipaliKolhe 9-May-11 2:45am    
Session variables should work.. what is the issue with session variables?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900