944,092 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 12923
  • ASP.NET RSS
May 20th, 2005
0

Get submitted values when navigating back with browser back button

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jayakumar R is offline Offline
7 posts
since Jan 2005
May 20th, 2005
0

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

ViewState can be very tricky. Try using a Session state variable for this, or, the tried-and-true method of writing a cookie instead.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
May 26th, 2005
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jayakumar R is offline Offline
7 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: how to update visual studio .net 2003
Next Thread in ASP.NET Forum Timeline: StreamReaderClass





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC