Get submitted values when navigating back with browser back button

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2005
Posts: 7
Reputation: Jayakumar R is an unknown quantity at this point 
Solved Threads: 0
Jayakumar R Jayakumar R is offline Offline
Newbie Poster

Get submitted values when navigating back with browser back button

 
0
  #1
May 20th, 2005
Hi
I have a peculiar problem. I created an ASP.Net page with the code behind in C#. After submitting I am storing the primary key value of the row inserted in a ViewState variable. Then I pass this as a query string and do a Response.Redirect() to another page. Then I use the browser back button to come back to the previous page. I click submit again. In the submit routine I am unable the get the same value I stored earlier in the Viewstate variable for the page. My aim is this. To prevent submitting again when clicking the submit button. For this I need to store the primary key to check whether it exists in the database after navigating by the back button. Can you help?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Get submitted values when navigating back with browser back button

 
0
  #2
May 20th, 2005
ViewState can be very tricky. Try using a Session state variable for this, or, the tried-and-true method of writing a cookie instead.
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 7
Reputation: Jayakumar R is an unknown quantity at this point 
Solved Threads: 0
Jayakumar R Jayakumar R is offline Offline
Newbie Poster

Re: Get submitted values when navigating back with browser back button

 
0
  #3
May 26th, 2005
Hi
Thanks for your feedback. I was curious whether ASP.Net has any other way of handling this issue I did not know. I will try with session or cookie. Thanks once again

Jayakumar
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC