[RESOLVED] how to retain values of the form when page refrshes it self
I have a form in which there some text boxe and a dropdwon list . when user select any item in a dropdwon list the page submit itself ,but all the input in the text box is cleared when the pages refresh.. how to retain the values the user has input ...
Any ideas....
Re: how to retain values of the form when page refrshes it self
If the page submits to itself, then you can perform a Request.Form() or Request.QueryString() to read the value that was submitted by the dropdownlist. Read it, then go through your dropdown list (<select>), look for the corresponding item and set it to be selected.
Re: how to retain values of the form when page refrshes it self
No that i am doing but i want it also for all the textboxes that i have got on the form. how can i do that ....
Re: how to retain values of the form when page refrshes it self
You'll have to do it in a similar way for each textbox then. Get value, populate textbox, checkbox, any control.
In ASP.NET, this has been taken care of by using viewstate.
Re: how to retain values of the form when page refrshes it self
yup i did by reading all the values of form and transforming them in querystring . For readers i am stating the code that i have used
Code:
For Each item In Request.Form
qs = qs & "&" & item & "=" & Request.Form(item)
Next