Results 1 to 5 of 5

Thread: [RESOLVED] how to retain values of the form when page refrshes it self

  1. #1

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    Resolved [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....

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  3. #3

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    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 ....

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

  5. #5

    Thread Starter
    Hyperactive Member Kirun's Avatar
    Join Date
    Oct 2001
    Location
    Karachi , Pakistan
    Posts
    333

    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
  •  



Click Here to Expand Forum to Full Width