User IP

You just need to add this line of code on the submit button click event or some other event

txtX.Text = Request.Browser.UserHostAddress
 
C#:
private void cmdCheckIP_Click(object sender, System.EventArgs e)
		{
			Response.Write(Request.UserHostAddress); 
		}

This is a simple code , Remember one thing

Request.UserHostAddress

will return the IP address of the Client.
 
You can also get other information from Request Object such as User Host Name , Browser, Operating System. etc. Just check properties of Request Object.
 
Back
Top