Sending variables through QueryString

Results 1 to 2 of 2

Thread: Sending variables through QueryString

  1. #1
    Join Date
    Dec 1969

    Default Sending variables through QueryString

    Hi. I&#039;ve got problems sending values through the Querystring. I want to execute another asp page, and send the data to it. I&#039;m not sure the correct syntax, but I got the following to work ( it looks a bit &#039;wrong way long way&#039;)<BR><BR>Dim Location, Price<BR> Location=Request.Form("Location")<BR> Price=Request.Form("Price")<BR><BR>--------------------------------------------------------------------------------------------<BR><BR>If Request.Form("AutoRespond")&#060;&#062;"" Then<BR> &#039;&#039;&#039;The following line wont work ? <BR> &#039;&#039;&#039; Server.Execute("AutoMail.asp?Loc="& <BR>Location& "&Pce="& Price &"")<BR> Response.Redirect("AutoMail.asp?Loc="& Location& "&Pce="& Price &"")<BR>End If<BR><BR>-----------------------------------------<BR>&#039; and in AutoMail.asp ---<BR><BR>Dim strSQL, intPce, strLoc<BR> intPce=Request.QueryString("Pce")<BR> strLoc=Request.QueryString("Loc")<BR> <BR> strSQL="SELECT * FROM tblMailList WHERE Location LIKE &#039;"& strLoc &"&#039; AND MinPrice &#060;="& intPce &" AND MaxPrice &#062;= "& intPce &"" <BR><BR>-------------<BR>Have I got this right? is there a better way to send the values?<BR>Thanks <BR>Zeg

  2. #2
    Join Date
    Dec 1969

    Default If you use Server.Execute... don&#039;t *need* to send the values to the executed page. The system does it for you automatically.<BR><BR>So the code in the invoked page *should* be able to do<BR><BR>Dim Location, Price<BR>Location=Request.Form("Location")<BR>Pric e=Request.Form("Price")<BR><BR>and get the same info as the main page in the same way. (Note: I don&#039;t have IIS 5, so I can only tell you what the docs say. Server.Execute doesn&#039;t work on PWS.)<BR><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