Windows Information

G

Greg

Via C# Code-Behind files, how can I retrieve information about the client
computer viewing my pages. I'm looking to gather information such as:

Windows User Name
Computer IP Address
Computer Name
Current Web Page being viewed
Previous Page visited.
Are Cookies Enabled?
Current Browser
Browser Version
etc.

I know I can get some information using Simple Binding(?), such as
<%# Request.Browser.Browser %> to get info about the browser, but I'm
looking for Windows and Machine specific information instead and via the
Code-Behind file.

I want to gather this information because I'm going to be logging this
information into a database to gather statistics on who is visiting my
web-site, what pages, how long, etc. I know there are Internet Hit Counters,
but I have had no luck finding something I can using internally on our
Intranet.

And, also, is there a simple way via Code-Behind files to identify each
control on my page, get it's name, it's type (asp:label, asp:textbox, etc)
and the value in the controls?

Thanks,

Greg
 
D

Duggi

Via C# Code-Behind files, how can I retrieve information about the client
computer viewing my pages. I'm looking to gather information such as:

Windows User Name
Computer IP Address
Computer Name
Current Web Page being viewed
Previous Page visited.
Are Cookies Enabled?
Current Browser
Browser Version
etc.

I know I can get some information using Simple Binding(?), such as
<%# Request.Browser.Browser %> to get info about the browser, but I'm
looking for Windows and Machine specific information instead and via the
Code-Behind file.

I want to gather this information because I'm going to be logging this
information into a database to gather statistics on who is visiting my
web-site, what pages, how long, etc. I know there are Internet Hit Counters,
but I have had no luck finding something I can using internally on our
Intranet.

And, also, is there a simple way via Code-Behind files to identify each
control on my page, get it's name, it's type (asp:label, asp:textbox, etc)
and the value in the controls?

Thanks,

Greg

Some of them can be addressed through WindowsIdentity class

WindowsIdentity.GetCurrent().Name

please explore more on the same

http://msdn.microsoft.com/en-us/library/t6547wf1(VS.71).aspx may help

-Cnu
 
R

Ralph

Via C# Code-Behind files, how can I retrieve information about the client
computer viewing my pages. I'm looking to gather information such as:

Windows User Name
Computer IP Address
Computer Name
Current Web Page being viewed
Previous Page visited.
Are Cookies Enabled?
Current Browser
Browser Version
etc.

I know I can get some information using Simple Binding(?), such as
<%# Request.Browser.Browser %> to get info about the browser, but I'm
looking for Windows and Machine specific information instead and via the
Code-Behind file.

I want to gather this information because I'm going to be logging this
information into a database to gather statistics on who is visiting my
web-site, what pages, how long, etc. I know there are Internet Hit Counters,
but I have had no luck finding something I can using internally on our
Intranet.

And, also, is there a simple way via Code-Behind files to identify each
control on my page, get it's name, it's type (asp:label, asp:textbox, etc)
and the value in the controls?

Thanks,

Greg

you can use request.browser and any other properties of request from
the code behind.
Also you have access to Request.Form[].
You can enemerat that and get all form variables with values.
also you can use getControl and create a recursive function to get all
controls on a page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top