Query string

Results 1 to 3 of 3

Thread: Query string

  1. #1
    Join Date
    Dec 1969

    Default Query string

    Hi <BR><BR>If a link has a query string after it, how do you put that query string into a variable on the page that it goes to? <BR><BR>Thanks <BR>

  2. #2
    Colin McBride Guest

    Default RE: Query string

    Hi Tammy,<BR><BR>Not sure if I fully understand the question but here goes:<BR><BR>Calling page HTML:<BR>&#060;a href="AnewPage.asp?Name=Colin"&#062;A Link to a page&#060;/a&#062;<BR><BR>Called Page ASP:<BR>sName = Request.querystring("Name")<BR><BR>You can then use the variable sName wherever you like on the server side of the called page.<BR><BR>Cheers<BR>Colin<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Query string

    If I understand you right, you are talking about how to capture a GET posting; something like:<BR>...<BR>&#060;a href="page.asp?variable1=ekffkn&variable2=fffg"&#0 62;<BR>...<BR><BR>You can capture those variables above for example, by doing something like this:<BR>...<BR>&#060;%<BR>Dim thisvar1<BR>Dim thisvar2<BR><BR>thisvar1 = Request.QueryString("variable1")<BR>thisvar2 = Request.QueryString("variable2")<BR>%&#062;<BR>... <BR><BR>This will work the same way if you are directly adding those strings into the url from a link or you are using a form to post to the second page using the GET format.

Posting Permissions

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