Session variable

Results 1 to 3 of 3

Thread: Session variable

  1. #1
    GY Guest

    Default Session variable

    I&#039;m trying to page through search results and pass a value from page to page using a session variable. I set up the session variable where "textsearch" is the value entered by the user:<BR><BR>Session("Search") = Request("textsearch")<BR>Stext = Session("Search")<BR><BR>Now my problem is when I click on my Next link to view the next page of results, I lose that value. I wrote out the contents of the session variable before I clicked the Next link:<BR><BR>for each thing in session.Contents<BR> Response.Write ("<BR>"&thing&"="&session.Contents(thing))<BR>Next <BR><BR>and it gave me the correct value entered by the user. After I click the Next link, there is nothing in the session. Any thoughts?

  2. #2
    Join Date
    Dec 1969

    Default RE: Session variable

    The link which takes u to the next page does not pass the parameter ("textsearch")

  3. #3
    Join Date
    Dec 1969

    Default RE: Session variable

    In passing the session you are forgetting this: <BR>Session("value")=Request.form("enteredvalue")< BR>the entered value is the name of your input<BR>i.e &#060;input name="enteredvalue"&#062;

Posting Permissions

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