Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

 

txtX.Text = Request.Browser.UserHostAddress

The one and only

Dr. Madz

eee-m@il

Posted

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.

The one and only

Dr. Madz

eee-m@il

Posted
You can also get other information from Request Object such as User Host Name , Browser, Operating System. etc. Just check properties of Request Object.

The one and only

Dr. Madz

eee-m@il

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...