browscap.ini as an Array?

Discussion in 'ASP General' started by George Hester, Jan 23, 2004.

  1. If you take a look at this page:

    http://www.abiglime.com/webmaster/articles/asp/121798.htm

    there is "[A]n example of using this component...below"

    Here he sets the ServerObject but lists each component of the object as if he knows what they are. Granted I could always go to browsecap.ini and find these for my version of the browser. But that's not good. What I'd like is something such as this:

    <%
    For Each v in browserdetect
    '
    Next
    %>

    But I get this is not supported. How can I access the components of the browscap.dll in this way? Thanks.

    --
    George Hester
    __________________________________
     
    George Hester, Jan 23, 2004
    #1
    1. Advertising

  2. If you look closely at browscap.ini, it can't be used in the way you
    suggest. It uses wildcard pattern matching, so what do you expect to put in
    your array? And what can you do with it that browscap doesn't already do?

    The major browser shifts are relatively trivial to differentiate with simple
    string parsing. There is no need for all this added complexity, IMHO...

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "George Hester" <> wrote in message
    news:...
    If you take a look at this page:

    http://www.abiglime.com/webmaster/articles/asp/121798.htm

    there is "[A]n example of using this component...below"

    Here he sets the ServerObject but lists each component of the object as if
    he knows what they are. Granted I could always go to browsecap.ini and find
    these for my version of the browser. But that's not good. What I'd like is
    something such as this:

    <%
    For Each v in browserdetect
    '
    Next
    %>

    But I get this is not supported. How can I access the components of the
    browscap.dll in this way? Thanks.

    --
    George Hester
    __________________________________
     
    Aaron Bertrand - MVP, Jan 23, 2004
    #2
    1. Advertising

  3. The dll tries to match the useragent in the headers to find its location in the ini file. Once that is done the entries under that section should not have to be obtained by knowing what they are. That makes the use of the component a bummer. Once the dll finds the section in the ini that most approximates the useragent in the headers then we should be able to send what is there to an array. I believe the issue here is getting the data out of a ini file. An ODBC connection may be necessary with a schema.ini where we could then just get a record and list the fields. For that is really what I am looking for; the fields and the data. Just a thought.

    --
    George Hester
    __________________________________
    "Aaron Bertrand - MVP" <> wrote in message news:...
    > If you look closely at browscap.ini, it can't be used in the way you
    > suggest. It uses wildcard pattern matching, so what do you expect to put in
    > your array? And what can you do with it that browscap doesn't already do?
    >
    > The major browser shifts are relatively trivial to differentiate with simple
    > string parsing. There is no need for all this added complexity, IMHO...
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > http://www.aspfaq.com/
    >
    >
    >
    >
    > "George Hester" <> wrote in message
    > news:...
    > If you take a look at this page:
    >
    > http://www.abiglime.com/webmaster/articles/asp/121798.htm
    >
    > there is "[A]n example of using this component...below"
    >
    > Here he sets the ServerObject but lists each component of the object as if
    > he knows what they are. Granted I could always go to browsecap.ini and find
    > these for my version of the browser. But that's not good. What I'd like is
    > something such as this:
    >
    > <%
    > For Each v in browserdetect
    > '
    > Next
    > %>
    >
    > But I get this is not supported. How can I access the components of the
    > browscap.dll in this way? Thanks.
    >
    > --
    > George Hester
    > __________________________________
    >
    >
     
    George Hester, Jan 23, 2004
    #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. Sphinx

    ini file

    Sphinx, Feb 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,374
    Gerry O'Brien [MVP]
    Feb 25, 2004
  2. chapman

    Update INI file problem

    chapman, Jul 31, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    444
    chapman
    Jul 31, 2003
  3. isore
    Replies:
    0
    Views:
    534
    isore
    Jul 1, 2004
  4. Smitha Patel

    INI or Any Other File..... ?

    Smitha Patel, May 23, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    424
    Brock Allen
    May 23, 2005
  5. MikeVance

    Ini file equivalent ASP.Net etc

    MikeVance, Jan 20, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    595
    Peter Zolja
    Jan 20, 2006
Loading...

Share This Page