Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > browscap.ini as an Array?

Reply
Thread Tools

browscap.ini as an Array?

 
 
George Hester
Guest
Posts: n/a
 
      01-23-2004
If you take a look at this page:

http://www.abiglime.com/webmaster/ar...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
__________________________________
 
Reply With Quote
 
 
 
 
Aaron Bertrand - MVP
Guest
Posts: n/a
 
      01-23-2004
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/ar...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
__________________________________


 
Reply With Quote
 
 
 
 
George Hester
Guest
Posts: n/a
 
      01-23-2004
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/ar...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
> __________________________________
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57