标签: asp.net javascript
如何在asp.net中获取客户端IP地址。
答案 0 :(得分:7)
HttpRequest.UserHostAddress
http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress.aspx
答案 1 :(得分:4)
我在ASP.NET 3.5中使用它 string ip = Request.UserHostAddress();
string ip = Request.UserHostAddress();