Results 1 to 4 of 4

Thread: looking for existence of Querystring [Resolved]

  1. #1

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Resolved looking for existence of Querystring [Resolved]

    I'm trying to write a way to check for the existance of a querystring, not its value.

    I was thinking something like

    If Request.Querystring("Param") is Nothing then
    end if

    I'm not worried if it has a value or not, I just wanna check to see if its there or not.

    Thanks!
    Last edited by drpcken; Jan 13th, 2005 at 05:14 PM.

  2. #2
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: looking for existence of Querystring

    You could do:

    If Request.Item("Param") is Nothing then
    End IF

    That is essentially the same thing.

  3. #3
    Addicted Member
    Join Date
    Aug 2004
    Location
    Cape Town, South Africa
    Posts
    149

    Re: looking for existence of Querystring

    I suppose you could also just count the collection if you were only passing one querystring.

    VB Code:
    1. Dim Count As Integer = Request.QueryString.Count
    2.  
    3. if Count = 0 then
    4. end if

  4. #4

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Re: looking for existence of Querystring

    Thanks for the suggestions guys, Token's worked perfectly.

Posting Permissions

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



Click Here to Expand Forum to Full Width