Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maintaining Form Values

Status
Not open for further replies.

arpan

Programmer
Joined
Oct 16, 2002
Messages
336
Location
IN
My ASP application has a HTML Form with different Form elements. Assume that this page is named Clients.asp. There is a button at the bottom of this page clicking which the user is taken to another page named Contacts.asp. Clicking a link in Contacts.asp takes the user back to Clients.asp. Now suppose a user enters values in the different Form fields & then clicks the button which takes him to Contacts.asp. When the user now clicks a link in Contacts.asp, he is taken back to Clients.asp but what I find is that the values in the different Form fields (which the user had already entered in the different Form elements before going to Contacts.asp) are no longer there. Is there someway by which I can maintain these Form elements values when the user comes back to Clients.asp from Contacts.asp?

Thanks,

Arpan
 
yes, store them on hidden fields in the second page and then when you get back to main page just print them out.

________
George, M
 
Unfortunately you have to write some extra code
I think you've got a number of options:

1.Session Variables - save the date submited from the form as a session variable when you post to the second page, reference this in the 1st form

<input type=&quot;text&quot; value=&quot;<%= Session(&quot;aValue&quot;)%>&quot; >

2. Pass the data between pages in the query string or hidden variables

3. Use a cookie

Hope this helps

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top