.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> Network >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Track User IP Address

Posted By:Praveen       Posted Date: December 16, 2008    Points: 10    Category: Network    URL: http://www.dotnetspark.com  
 

Below is the code to track user IP Address. Some Asp.NET Application need to track user's ip address for future use or something else.

There are so many method to Track User IP address below is the simplest one. You can use request object to obtain IP Address like this in C#.

string ipAddress = Request.UserHostAddress;

Response.Write(ipAddress);

Happy Coding!!!


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend