Click here to Skip to main content
15,895,256 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

Please help me how to convert int to IP address in asp.net.

Thanks in advance
Posted

1 solution

Depends on what is in the int: the simplest way if to use the appropriate IPAddress constructor:
http://msdn.microsoft.com/en-us/library/13180abx(v=vs.110).aspx[^]
C#
private IPAddress GetIPFromInt(Int64 i)
    {
    return new IPAddress(i);
    }
 
Share this answer
 
v2
Comments
srmohanr 20-Feb-14 6:15am    
Thank you. It's working fine
OriginalGriff 20-Feb-14 6:19am    
You're welcome!

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