Determining if the value passed is from a QueryStr

Results 1 to 2 of 2

Thread: Determining if the value passed is from a QueryStr

  1. #1
    Dave2000 Guest

    Default Determining if the value passed is from a QueryStr

    I have a web page that has an image map and a form. The user either has the option of clicking on the image map to pass a value to the next page or filling out the form to pass the values to the next page. How can I check to see if the values that are being passed to the next page are from a QueryString or Form? Thanks in advance for your help.

  2. #2
    David Mann Guest

    Default Here's how.

    I&#039m assuming that you are naming the name of the object the same, for both the form object and the query string object, right? So if you had this:<BR><BR>someasp.asp?name=David<BR><BR>AND you had:<BR><BR>&#060;input type="text" name="name" value="David"&#062;<BR><BR>Then do this:<BR><BR>&#060;%<BR>If Request.QueryString("name") &#060;&#062; "" Then<BR> qsFlag = 1 <BR> &#039If there was something in the query string input, then flag<BR> &#039the query string<BR>Else<BR> qsFlag = 0<BR> &#039else if there was nothing in the query string, then you <BR> &#039could do some other testing to handle the Request.Form<BR> &#039data as well as flag the query string as being off.<BR>End If<BR><BR>%&#062;<BR><BR>There are many other ways to do this, I&#039m sure, but that&#039s the easiest I could think of at the moment. Hope this helps!<BR><BR>Sincerely,<BR> --David

Posting Permissions

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