I’m Creating an asp.net Web Site using C#.
I have a page called Set Event which has some text fields. After filling some of them there is a button that redirects the user to another page. This page has a button that will do some database process and then redirects to the previous page.
After that page processes I want to redirect back to the previous page (Set Event) to fill other text fields.
The question is: when I redirect to the previous page my previous filled data is gone–empty text boxes. Where has my data gone?
You have two options (IMO)
Keep passing the data back and forth from client to server, i.e. hidden fields, viewstate, etc.
save the data in Session, i.e. Session[“field1”] = “field1data”, or a database, cache, etc.
then recall it on the original page.