passing variables from one asp page to another.

Discussion in 'ASP General' started by Chieko Kuroda, Jan 30, 2004.

  1. Hello all,
    I would like to learn the syntax for passing variables that I retreived from
    a database to a second asp page. Currently, I'm using:

    Response.Write "<tr><td>&nbsp;</td><td><Font size= ""-1""><B><a href=
    ""InterviewerInfo2.asp?timeID=" & rs("Starttime") & " "">"
    How do I add more variables to my link: <a href = ...?
    ie Nameofcandidate and InterviewDate

    in this context:

    ' Iterate through times
    While Not(RS.EOF)

    ' If date changes
    If lDateID<>RS("DateID") Then

    ' If this is not first date, close out previous group
    If lDateID>0 Then Response.write "</tr><tr><td
    height=10><hr></td></tr>"

    ' Print header for new group
    Response.write "<tr><td>Candidate Name: </td><td>" & "<B>" &
    RS("NameofCandidate") & "</b>" & "</td></tr>" & vbcrlf
    Response.write "<tr><td>Interview Date: </td><td>" &
    RS("InterviewDate") & "</td></tr>" & vbcrlf
    Response.write "<tr><td>Interview DateID: </td><td>" &
    RS("DateID") & "</td></tr>" & vbcrlf
    Response.write "<tr><td height=10></td></tr>" & vbcrlf
    Response.write "<tr><td>Available time
    Slots:&nbsp;&nbsp;</td><td>Start Time</td><td>End Time</td></tr>" & vbcrlf

    ' Update group
    lDateID = RS("DateID")

    End If

    ' Print detail
    Response.Write "<tr><td>&nbsp;</td><td><Font size= ""-1""><B><a
    href= ""InterviewerInfo2.asp?timeID=" & rs("Starttime") & " "">" & _
    RS("StartTime") & "</a></td><td>" & RS("EndTime") & "</td></tr>"
    & vbcrlf

    Your help is appreciated,
    Chieko
    Chieko Kuroda, Jan 30, 2004
    #1
    1. Advertising

  2. Chieko Kuroda

    Alex Goodey Guest

    InterviewerInfo2.asp?timeID=1&Nameodcandidate=3&othervar=5

    "Chieko Kuroda" <> wrote in message
    news:%...
    > Hello all,
    > I would like to learn the syntax for passing variables that I retreived

    from
    > a database to a second asp page. Currently, I'm using:
    >
    > Response.Write "<tr><td>&nbsp;</td><td><Font size= ""-1""><B><a href=
    > ""InterviewerInfo2.asp?timeID=" & rs("Starttime") & " "">"
    > How do I add more variables to my link: <a href = ...?
    > ie Nameofcandidate and InterviewDate
    >
    > in this context:
    >
    > ' Iterate through times
    > While Not(RS.EOF)
    >
    > ' If date changes
    > If lDateID<>RS("DateID") Then
    >
    > ' If this is not first date, close out previous group
    > If lDateID>0 Then Response.write "</tr><tr><td
    > height=10><hr></td></tr>"
    >
    > ' Print header for new group
    > Response.write "<tr><td>Candidate Name: </td><td>" & "<B>" &
    > RS("NameofCandidate") & "</b>" & "</td></tr>" & vbcrlf
    > Response.write "<tr><td>Interview Date: </td><td>" &
    > RS("InterviewDate") & "</td></tr>" & vbcrlf
    > Response.write "<tr><td>Interview DateID: </td><td>" &
    > RS("DateID") & "</td></tr>" & vbcrlf
    > Response.write "<tr><td height=10></td></tr>" & vbcrlf
    > Response.write "<tr><td>Available time
    > Slots:&nbsp;&nbsp;</td><td>Start Time</td><td>End Time</td></tr>" & vbcrlf
    >
    > ' Update group
    > lDateID = RS("DateID")
    >
    > End If
    >
    > ' Print detail
    > Response.Write "<tr><td>&nbsp;</td><td><Font size= ""-1""><B><a
    > href= ""InterviewerInfo2.asp?timeID=" & rs("Starttime") & " "">" & _
    > RS("StartTime") & "</a></td><td>" & RS("EndTime") &

    "</td></tr>"
    > & vbcrlf
    >
    > Your help is appreciated,
    > Chieko
    >
    >
    >
    >
    Alex Goodey, Jan 30, 2004
    #2
    1. Advertising

  3. Chieko Kuroda

    Bullschmidt Guest

    Or you could use session variables:

    Session("UserLastName") = "Smith"

    Response.Write Session("UserLastName")

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    http://www.Bullschmidt.com
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt, Feb 3, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe
    Replies:
    1
    Views:
    1,153
    Jim Gibson
    Oct 1, 2003
  2. Steve C. Orr, MCSD
    Replies:
    0
    Views:
    494
    Steve C. Orr, MCSD
    Aug 8, 2003
  3. Prakash R.
    Replies:
    1
    Views:
    293
    Child
    Aug 8, 2003
  4. Philip Poole
    Replies:
    3
    Views:
    535
    Jim Corey
    Sep 23, 2004
  5. Robert Cohen
    Replies:
    3
    Views:
    265
    Andrew Durstewitz
    Jul 15, 2003
Loading...

Share This Page