String ip=Server.HTMLEncode(Request.UserHostAddress);
Put this line where you want the ip address of the system accessing the page.You will get 127.0.0.1 if you try it on localhost.After deployment on server,you will get the system's public ip address
as a string.