Question:
How to retrieve visitor's IP?
Answer:
Front section (*.aspx)
....
<asp:Label ID="LblLoggedIP" runat="server" Text="Logged IP:"> <asp:Label>
....

Code Behind section (*.aspx.cs)
....
IPAddress = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].Trim(); LblLoggedIP.Text = "Logged IP: " + IPAddress;
....


Need help with XHTML, ASP.NET, C# or SQL-Server? - Contact Webmaster