assigning listbox value to variable

Results 1 to 2 of 2

Thread: assigning listbox value to variable

  1. #1
    Rob Guest

    Default assigning listbox value to variable

    I have a bunch of listboxes, with one submit button.<BR>When the user presses the submit button, i would like to asign te value every listbox to a variable without leaving the page, and passing the variables to another asp page. Is this possible ?<BR><BR>I&#039m using VBscript<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: assigning listbox value to variable

    Your best bet is to set the action of the form to itself, so that the page seems to refresh when you press submit. You then use an if statment to see if this is the first time the page has been called or if the form has been submitted (I personally attach a querystring the second time around so I can tell the difference). If it is the second time around you request.form the values out and store them somewhere, be it session variables, database, text file on server, dictionary object - whichever, then on the other page you can retrieve these values from where you saved them.<BR><BR>FYI - having a form repeat itself is known as the rollback trick, and in the new ASP+ (ASP.NET) Microsoft has made this a lot easier

Posting Permissions

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