|
-
Jul 16th, 2008, 07:36 AM
#1
Thread Starter
Hyperactive Member
[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....
-
Jul 16th, 2008, 01:50 PM
#2
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.
-
Jul 17th, 2008, 12:37 AM
#3
Thread Starter
Hyperactive Member
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 ....
-
Jul 17th, 2008, 12:24 PM
#4
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.
-
Jul 22nd, 2008, 05:56 AM
#5
Thread Starter
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|