Multiple Querystring

Discussion in 'ASP General' started by Deepiceman, Oct 7, 2003.

  1. Deepiceman

    Deepiceman Guest

    Hi all,

    Here's a newbie question for you all. I have a page lets call it
    main.asp On this page there are 2 links both pointing to the same page
    but sends different querystrings. for example
    http://localhost/new.asp?id=2
    http://localhost/new.asp?state=ca

    On the new.asp page I have a couple functions that are being called
    depending on the querystring being passed. if "id" is found go fetch
    the results from a database. if "state" is found check the case
    statements. if no querystring then go to the default function. (all in
    the same page)

    Here is my if else code but I am not sure what I am doing wrong since
    it keeps trying to find a "End" somewhere in the code.

    -------------------------------
    If (Request.QueryString("ID") <> "") Then
    callpara = Request.QueryString("ID")
    display()
    Else if (Request.QueryString("State") <> "") Then
    statereq = Request.QueryString("State") 'statereq --- State
    requested
    select case statereq
    case "AZ"
    azreq()
    case "AK"
    akreq()
    case "WA"
    wareq()
    end select 'more states will follow but not more than 10
    Else
    normal()
    End if
    -------------------------------

    Now I know the if-else has to end and then I have to start a new
    if-else but thats where I am going wrong. Any ideas as to how to make
    this simple, and most of all make it work?

    Thanks in advance
    Deep.
     
    Deepiceman, Oct 7, 2003
    #1
    1. Advertising

  2. In article <>,
    says...
    > Else if (Request.QueryString("State") <> "") Then


    ElseIf, not Else If

    -- Rick


    --
    Who's better for furniture? NOOOOOOOOOOOOOOOOOOBODY!!!!
    Guinness Mann
     
    Guinness Mann, Oct 7, 2003
    #2
    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. Carl Howarth
    Replies:
    1
    Views:
    489
    Saravana
    Jul 24, 2003
  2. moondaddy
    Replies:
    1
    Views:
    6,828
    moondaddy
    Feb 28, 2004
  3. Mehdi
    Replies:
    6
    Views:
    36,255
    sloan
    Apr 6, 2006
  4. codewarrior
    Replies:
    0
    Views:
    546
    codewarrior
    May 4, 2009
  5. Adeel Ahmad
    Replies:
    1
    Views:
    583
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page