locked
Set the Client IP Address upon Form Load RRS feed

  • Question

  • I understand to set the Client IP Address in a field upon Form Load, the following code is used:

    using System.Web;

     

    // ...

    public void FormEvents_Loading(object sender, LoadingEventArgs e)
    {

    //...

    node.SetValue(HttpContext.Current.Request.UserHostAddress);

    }

    Node and HTTPContext are underlined as being incorrect.

    My field name is txtIPAddress

    Can someone tell me what I am doing wrong, please?

    New to infopath and C#

    Thanks

     

    Monday, April 18, 2011 5:01 PM

Answers