Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Convert decimal IP in ASPX

  • 29-01-2007 2:25pm
    #1
    Closed Accounts Posts: 1,974 ✭✭✭


    Hi there,

    Does anybody would be kind enough to give me an ASPX snipet to convert the result of a SQL query that will return this type of value :
    2130706433

    I need to implement a small converter in my ASPX script that will calculate the real value of the IP address and will actually give me, here for instance with the example given up, 127.0.0.1

    Thanks for your help.


Comments

  • Registered Users, Registered Users 2 Posts: 2,152 ✭✭✭dazberry


    In ASP.NET 2.0 you could do something like:

    long Address = IPAddress.HostToNetworkOrder(2130706433);
    IPEndPoint EndPoint = new IPEndPoint(Address,0);
    EndPoint.Address.ToString(); // = "127.0.0.1"

    D.


  • Closed Accounts Posts: 1,974 ✭✭✭mick.fr


    Thanks I appreciate.


Advertisement