By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,002 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,002 IT Pros & Developers. It's quick & easy.

Find out OS/Browser/....

P: n/a
We want to keep track of what OS/Browser people are using for our website.
How can I find that out so that I can write it to a DB ? I know how to get
it into the DB; I just need to know how to get that stuff in .Net.

Thanks.

J.
May 14 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
OJ
On 14 May, 16:15, "Mufasa" <j...@nowhere.comwrote:
We want to keep track of what OS/Browser people are using for our website.
How can I find that out so that I can write it to a DB ? I know how to get
it into the DB; I just need to know how to get that stuff in .Net.

Thanks.

J.
Hi,
try the Request.Browser object....

a bit of google goes a long way...

O

May 14 '07 #2

P: n/a
Hello Mufasa,

See HttpRequest.Browser and HttpRequest.UserAgent;

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

MWe want to keep track of what OS/Browser people are using for our
Mwebsite. How can I find that out so that I can write it to a DB ? I
Mknow how to get it into the DB; I just need to know how to get that
Mstuff in .Net.
M>
MThanks.
M>
MJ.
M>
May 14 '07 #3

P: n/a
Browser you can find you by reading User_Agent from ServerVaraibles.

Usually staff like that is done with Javascript using Navigator object.
first page that outputted to browser has a JavaScript code that collects all
that info and request a transparent pixel passing all that info as a
parameter.

<script>
....get all info into sVar.....
document.write("<img src=collectdata.aspx?par=" + sVar + " border=0>");
</script>

Good luck. You can look at pretty much any statistical/free counter there
available. They almost all have code to collect visitors data.
GoogleAnalytic for example.

George.

"Mufasa" <jb@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
We want to keep track of what OS/Browser people are using for our website.
How can I find that out so that I can write it to a DB ? I know how to get
it into the DB; I just need to know how to get that stuff in .Net.

Thanks.

J.

May 14 '07 #4

P: n/a
Thanks for the info. Problem with google - if you don't know what your
looking for, it can take forever to find anything.

Frequently I've had it where I post a message here and then start googling.
And by the time I find something even close to appropriate, somebody has
already posted here.

But thanks again for the info.

J.

"OJ" <of****@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
On 14 May, 16:15, "Mufasa" <j...@nowhere.comwrote:
>We want to keep track of what OS/Browser people are using for our
website.
How can I find that out so that I can write it to a DB ? I know how to
get
it into the DB; I just need to know how to get that stuff in .Net.

Thanks.

J.

Hi,
try the Request.Browser object....

a bit of google goes a long way...

O

May 14 '07 #5

P: n/a
Save the following code as "detectBrowser.aspx" and run it :

detectBrowser.aspx:
------------------------------
<%@ Page Language="VB" Trace = "false" EnableViewState= "false" EnableSessionState = "false" Debug =
"false" %>

<script language="VB" runat="server">

Sub Page_Load(sender as Object, e as EventArgs)
BrowserName.Text = Request.Browser.Type & ", " & Request.Browser.Platform

BrowserData.Text = "Type = " & Request.Browser.Type & "<br>"
BrowserData.Text &= "Name = " & Request.Browser.Browser & "<br>"
BrowserData.Text &= "Version = " & Request.Browser.Version & "<br>"
BrowserData.Text &= "Major Version = " & Request.Browser.MajorVersion & "<br>"
BrowserData.Text &= "Minor Version = " & Request.Browser.MinorVersion & "<br>"
BrowserData.Text &= "Platform = " & Request.Browser.Platform & "<br>"
BrowserData.Text &= "Is Beta = " & Request.Browser.Beta & "<br>"
BrowserData.Text &= "Is Crawler = " & Request.Browser.Crawler & "<br>"
BrowserData.Text &= "Is AOL = " & Request.Browser.AOL & "<br>"
BrowserData.Text &= "Is Win16 = " & Request.Browser.Win16 & "<br>"
BrowserData.Text &= "Is Win32 = " & Request.Browser.Win32 & "<br>"
BrowserData.Text &= "Supports Frames = " & Request.Browser.Frames & "<br>"
BrowserData.Text &= "Supports Tables = " & Request.Browser.Tables & "<br>"
BrowserData.Text &= "Supports Cookies = " & Request.Browser.Cookies & "<br>"
BrowserData.Text &= "Supports VB Script = " & Request.Browser.VBScript & "<br>"
BrowserData.Text &= "Supports JavaScript = " & Request.Browser.JavaScript & "<br>"
BrowserData.Text &= "Supports EcmaScript version " & Request.Browser.EcmaScriptVersion.ToString() &
"<br>"
BrowserData.Text &= "Supports Java Applets = " & Request.Browser.JavaApplets & "<br>"
BrowserData.Text &= "CDF = " & Request.Browser.CDF & "<br>"
BrowserData.Text &= "MSDomVersion = " & Request.Browser.MSDomVersion.ToString() & "<br>"
BrowserData.Text &= "SupportsCss = " & Request.Browser.SupportsCss.ToString() & "<br>"
BrowserData.Text &= "W3CDomVersion = " & Request.Browser.W3CDomVersion.ToString() & "<br>"
BrowserData.Text &= "Http_User_Agent = " & Request.ServerVariables("http_user_agent") & "<br>"
End Sub
</script>

<html>
<body>

Your browser is: <asp:literal id="BrowserName" runat="server" />
<p>
<b><u>Here is part of what was detected about your browser's capabilities:</u></b><br />
<asp:literal runat="server" id="BrowserData" />

</body>
</html>

-------------------

HTH...


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Mufasa" <jb@nowhere.comwrote in message news:%2****************@TK2MSFTNGP04.phx.gbl...
We want to keep track of what OS/Browser people are using for our website. How can I find that out
so that I can write it to a DB ? I know how to get it into the DB; I just need to know how to get
that stuff in .Net.

Thanks.

J.

May 14 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.