Checking for URL Parameter

Discussion in 'ASP General' started by Keith, Jan 13, 2005.

  1. Keith

    Keith Guest

    Is it possible to do a quick check to see if you were refered to the page
    with URL parameters and if so perform an action?
     
    Keith, Jan 13, 2005
    #1
    1. Advertising

  2. Keith

    Keith Guest

    What does it return if there are no values? Should I check for NULL in that
    case?

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:eNw90jX%...
    > Check the Request.QueryString for values....
    >
    > --
    > Curt Christianson
    > Site & Scripts: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "Keith" <@.> wrote in message
    > news:O3%23JYPX%...
    >> Is it possible to do a quick check to see if you were refered to the page
    >> with URL parameters and if so perform an action?
    >>

    >
    >
     
    Keith, Jan 13, 2005
    #2
    1. Advertising

  3. If Request.QueryString.Count > 0 then
    'no querystring parameters
    else
    'querystring parameters present
    end if

    HTH,
    Bob Barrows

    Keith wrote:
    > What does it return if there are no values? Should I check for NULL
    > in that case?
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:eNw90jX%...
    >> Check the Request.QueryString for values....
    >>
    >> --
    >> Curt Christianson
    >> Site & Scripts: http://www.Darkfalz.com
    >> Blog: http://blog.Darkfalz.com
    >>
    >>
    >> "Keith" <@.> wrote in message
    >> news:O3%23JYPX%...
    >>> Is it possible to do a quick check to see if you were refered to
    >>> the page with URL parameters and if so perform an action?


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 13, 2005
    #3
  4. Keith

    Morris Guest

    Bob Barrows [MVP] wrote:
    > If Request.QueryString.Count > 0 then
    > 'no querystring parameters
    > else
    > 'querystring parameters present
    > end if
    >
    > HTH,
    > Bob Barrows


    Other way round, surely?

    If Request.QueryString.Count > 0 then
    ' there are more than 0 so there are querystring parameters present
    else
    'no querystring parameters present
    end if

    Morris
     
    Morris, Jan 13, 2005
    #4
  5. Morris wrote:
    > Bob Barrows [MVP] wrote:
    >> If Request.QueryString.Count > 0 then
    >> 'no querystring parameters
    >> else
    >> 'querystring parameters present
    >> end if
    >>
    >> HTH,
    >> Bob Barrows

    >
    > Other way round, surely?
    >
    > If Request.QueryString.Count > 0 then
    > ' there are more than 0 so there are querystring parameters
    > present else
    > 'no querystring parameters present
    > end if
    >
    > Morris

    D'oh!
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Jan 13, 2005
    #5
    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. Jon paugh
    Replies:
    1
    Views:
    939
  2. Sharon

    XSL: parameter checking

    Sharon, May 21, 2004, in forum: XML
    Replies:
    7
    Views:
    566
    Sharon Steringa
    May 24, 2004
  3. Replies:
    3
    Views:
    343
  4. pek
    Replies:
    71
    Views:
    2,087
    Arne Vajhøj
    Jun 20, 2008
  5. Just D.
    Replies:
    0
    Views:
    545
    Just D.
    Aug 11, 2004
Loading...

Share This Page