Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C#
Tip/Trick

Displaying System IP address, Browser Name and Version

Rate me:
Please Sign up or sign in to vote.
4.33/5 (3 votes)
20 Nov 2011CPOL 26.8K   11   1
C#
protected void Page_Load(object sender, EventArgs e)
    {
        HttpBrowserCapabilities bc = Request.Browser;
        Label1.Text = "IP Address=" + Request.UserHostAddress;
        Label2.Text = "Browser Name=" + bc.Browser;
        Label3.Text = "Browser Version=" + bc.Version;
    }

Using the above code, you will find IP address, Browser Name and Version.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Junior) Hp finsoft
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalif i want to know the ipaddress of anyone entering my websit... Pin
suhail517-Nov-11 19:15
suhail517-Nov-11 19:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.