ASP variables

Results 1 to 3 of 3

Thread: ASP variables

  1. #1
    Join Date
    Dec 1969

    Default ASP variables

    I am creating an ASP page in which dropdown lists are populated with information from a database. When a person makes a certain selection from the dropdown list, I would like to store this selection in a variable that can be used on another page. <BR><BR>Does anyone know of a way I can do this? I&#039ve thought about using global or session variables, but I really don&#039t know how to use them.

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP variables

    There are several ways to do this:<BR>If you are going to use the variable on several pages a session variable is probably the easiest way to do this. I am assuming that the dropdown box is a variable in a form with the name List.<BR>On the page that the form posts to just put the line of code<BR><BR>Session("List") = Request("List") <BR><BR>You can then call up Session("List") everytime that you need this variable. You don&#039t want to use the global variable because it will have one value for the entire website. With the session varaible each user has his own unique value.<BR><BR>Hope this is helpful<BR><BR>Dennis Branson<BR><BR>

  3. #3
    pnb Guest

    Default RE: ASP variables

    In the next page code in this way if you are using<BR>&#060;form method=post&#062; in the previous page<BR>dim fm<BR>fm = Request.form("select1")<BR><BR>(OR)<BR><BR>&#060;f orm method=get&#062; in the previous page<BR>dim fm<BR>fm = Request.QueryString("select1")<BR><BR>The selected one from the dropdown list will be stored<BR>in the fm variable. <BR>You can print it by Response.write fm<BR><BR>

Posting Permissions

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