Same Form Submit & Keeping Variable

Results 1 to 2 of 2

Thread: Same Form Submit & Keeping Variable

  1. #1
    Join Date
    Dec 1969

    Default Same Form Submit & Keeping Variable

    Hi, I have two asp forms. the first form passes a MemberID when clicking on a ahref link in a table of results.<BR><BR>The second page (page2.asp) is a search page, which submits to itself in the action .i.e<BR>&#060;form name="form1" action="page2.asp"&#062;<BR><BR>I can get the MemberID from the first page to display in a Hidden Text Field on Page2. The problem i have is if i want to perform more than one search on the page, which means submitting the same form over and over agian, i lose the MemberID after the first submit and cannot perform a search more than once. How can i overcome this issue, With Session Variables? Any help would be great.

  2. #2
    Join Date
    Dec 1969

    Default If you have the MemberID in a hidden...

    ...field in your second form (i.e. on page2.asp) and submit this form to the same page, then it should NOT get lost.<BR><BR>Example:<BR><BR>Page1.ASP<BR><BR>&#06 0;form name="Step1" action="page2.asp"&#062;<BR>&#060;input type="Text" name="MemberID" value="Member ID Here"&#062;<BR>&#060;input type="Submit"&#062;<BR>&#060;/form&#062;<BR><BR>Page2.ASP<BR><BR>&#060;form name="Step2" action="page2.asp"&#062;<BR>&#060;input type="hidden" name="MemberID" value="&#060;%=Request("MemberID")%&#062;"&#062;<B R>&#060;input type="Text" name="SearchText" value="Enter keywords here"&#062;<BR>&#060;input type="Submit"&#062;<BR>&#060;/form&#062;<BR><BR>The second form should receive the MemberID from the first form and when you then re-submit it to itself, the MemberID should still be there every time.<BR><BR>Oliver.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts