Last post Sep 11, 2009 06:50 PM by pixelsyndicate
Sep 11, 2009 06:13 PM|mitoy75|LINK
is it possible to retain the values of a asp:textbox (not passwords) after submit? in other words, i have a form where a user enters name, address, zip in an ajax tab. when the user clicks submit on the form i land on the next tab. but i wan to be able to
retain the entered values if the users wants to go back to the previous tab. is this possible?
Sep 11, 2009 06:47 PM|noahb|LINK
This should happen automatically if ViewState is enabled. Can you describe your situation a little more?
Sep 11, 2009 06:50 PM|pixelsyndicate|LINK
when the values are submitted, you can take the values and put them into Session memory... something like:
Session["username"] = UserName.Text;
and when the user goes back to the login page, you could set the OnLoad event handler for that TextBox to attempt to retrieve the value from session if it exists.
if(Session["username"] != null && Session["username"] != String.Empty)
UserName.Text = Session["username"].ToString();