Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm new to .NET. I want to show the public ip of the user system in my aspx page.
for Example(after login to way2sms.com, the bottom of the page shows which browser we using and public ip address of the system)

Please help me....
Posted

Try out:
XML
<script language="JavaScript">
localipinfo=java.net.InetAddress.getLocalHost();
ip=localipinfo.getHostAddress();

document.write("Your IP address is " +ip+ "<br>");
</script>


Though it might not work out for IE.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900