Detecting PPC 2002 vs. 2003 in ASP

Discussion in 'ASP General' started by Don Miller, Sep 11, 2003.

  1. Don Miller

    Don Miller Guest

    I can't seem to find at MS how to detect the 2002 OS vs. 2003 OS for web
    applications using ASP. This is the only page I could find
    (http://msdn.microsoft.com/library/en-us/guide_ppc/htm/designing_web_sites_f
    or_internet_explorer_for_pocket_pc_cheo.asp) and it only tells how to detect
    2000 vs. 2002 (and much of the graphic is cutoff on the right).



    It has the code below but it doesn't tell me how to distinguish between 2002
    and 2003 in ASP:

    if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
    ' add Pocket PC 2003 specific code.
    else
    ' add Pocket PC 2002 specific code.
    else
    ' add Pocket PC 2000 specific code.
    end if

    And then it has client-side code like this:

    // Check for Pocket PC
    var isPPC = strNav.indexOf("240x320");
    if(isPPC > -1) {
    var is2002 = strNav.indexOf("PPC");
    if(is2003 > -1) {
    // add Pocket PC 2003 specific code.
    }
    else
    if(is2002 > -1) {
    // add Pocket PC 2002 specific code.
    }

    but I don't see where the "is2003" variable comes from????

    Also, the BROWCAP.INI file that is supposed to contain the new browser info
    was a 2000 version. Is there an updated file for ASP developers somewhere?

    Thanks for any help.
     
    Don Miller, Sep 11, 2003
    #1
    1. Advertising

  2. Don Miller

    Tom B Guest

    The code has nested if statements.


    'Check for Pocket PC
    if (InStr(Request.ServerVariables("HTTP_UA_OS"), "POCKET PC")) then
    if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
    ' add Pocket PC 2003 specific code.
    else
    ' add Pocket PC 2002 specific code.
    else
    ' add Pocket PC 2000 specific code.
    end if
    else
    ' add code for other platforms.
    end if

    so if the server variabele HTTP_UA_OS contains POCKET PC then you know it's
    either 2002 or 2003
    if the server variable HTTP_USER_AGENT contains PPC (and the above is true)
    then it's 2003 otherwise it's 2002

    The other part of the code you are referring to is client-side.


    "Don Miller" <> wrote in message
    news:%23USTfD$...
    > I can't seem to find at MS how to detect the 2002 OS vs. 2003 OS for web
    > applications using ASP. This is the only page I could find
    >

    (http://msdn.microsoft.com/library/en-us/guide_ppc/htm/designing_web_sites_f
    > or_internet_explorer_for_pocket_pc_cheo.asp) and it only tells how to

    detect
    > 2000 vs. 2002 (and much of the graphic is cutoff on the right).
    >
    >
    >
    > It has the code below but it doesn't tell me how to distinguish between

    2002
    > and 2003 in ASP:
    >
    > if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
    > ' add Pocket PC 2003 specific code.
    > else
    > ' add Pocket PC 2002 specific code.
    > else
    > ' add Pocket PC 2000 specific code.
    > end if
    >
    > And then it has client-side code like this:
    >
    > // Check for Pocket PC
    > var isPPC = strNav.indexOf("240x320");
    > if(isPPC > -1) {
    > var is2002 = strNav.indexOf("PPC");
    > if(is2003 > -1) {
    > // add Pocket PC 2003 specific code.
    > }
    > else
    > if(is2002 > -1) {
    > // add Pocket PC 2002 specific code.
    > }
    >
    > but I don't see where the "is2003" variable comes from????
    >
    > Also, the BROWCAP.INI file that is supposed to contain the new browser

    info
    > was a 2000 version. Is there an updated file for ASP developers somewhere?
    >
    > Thanks for any help.
    >
    >
    >
     
    Tom B, Sep 11, 2003
    #2
    1. Advertising

  3. Don Miller

    Don Miller Guest

    Doh!

    "Tom B" <> wrote in message
    news:#...
    > The code has nested if statements.
    >
    >
    > 'Check for Pocket PC
    > if (InStr(Request.ServerVariables("HTTP_UA_OS"), "POCKET PC")) then
    > if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
    > ' add Pocket PC 2003 specific code.
    > else
    > ' add Pocket PC 2002 specific code.
    > else
    > ' add Pocket PC 2000 specific code.
    > end if
    > else
    > ' add code for other platforms.
    > end if
    >
    > so if the server variabele HTTP_UA_OS contains POCKET PC then you know

    it's
    > either 2002 or 2003
    > if the server variable HTTP_USER_AGENT contains PPC (and the above is

    true)
    > then it's 2003 otherwise it's 2002
    >
    > The other part of the code you are referring to is client-side.
    >
    >
    > "Don Miller" <> wrote in message
    > news:%23USTfD$...
    > > I can't seem to find at MS how to detect the 2002 OS vs. 2003 OS for web
    > > applications using ASP. This is the only page I could find
    > >

    >

    (http://msdn.microsoft.com/library/en-us/guide_ppc/htm/designing_web_sites_f
    > > or_internet_explorer_for_pocket_pc_cheo.asp) and it only tells how to

    > detect
    > > 2000 vs. 2002 (and much of the graphic is cutoff on the right).
    > >
    > >
    > >
    > > It has the code below but it doesn't tell me how to distinguish between

    > 2002
    > > and 2003 in ASP:
    > >
    > > if (InStr(Request.ServerVariables("HTTP_USER_AGENT"), "PPC")) then
    > > ' add Pocket PC 2003 specific code.
    > > else
    > > ' add Pocket PC 2002 specific code.
    > > else
    > > ' add Pocket PC 2000 specific code.
    > > end if
    > >
    > > And then it has client-side code like this:
    > >
    > > // Check for Pocket PC
    > > var isPPC = strNav.indexOf("240x320");
    > > if(isPPC > -1) {
    > > var is2002 = strNav.indexOf("PPC");
    > > if(is2003 > -1) {
    > > // add Pocket PC 2003 specific code.
    > > }
    > > else
    > > if(is2002 > -1) {
    > > // add Pocket PC 2002 specific code.
    > > }
    > >
    > > but I don't see where the "is2003" variable comes from????
    > >
    > > Also, the BROWCAP.INI file that is supposed to contain the new browser

    > info
    > > was a 2000 version. Is there an updated file for ASP developers

    somewhere?
    > >
    > > Thanks for any help.
    > >
    > >
    > >

    >
    >
     
    Don Miller, Sep 11, 2003
    #3
    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. laks
    Replies:
    0
    Views:
    444
  2. Russ
    Replies:
    2
    Views:
    154
    Lewis Wang [MSFT]
    Aug 20, 2003
  3. Martin

    Supporting PPC 2003 and Mobile 5

    Martin, Jan 5, 2006, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    121
    Martin
    Jan 5, 2006
  4. Harry Simpson

    PPC 2002 and Webservices problem?

    Harry Simpson, Jun 16, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    125
    Harry Simpson
    Jun 16, 2004
  5. Emil Frank

    Detecting MS Outlook 2002/2003

    Emil Frank, Sep 27, 2004, in forum: Javascript
    Replies:
    6
    Views:
    140
    Emil Frank
    Oct 13, 2004
Loading...

Share This Page