App-config nto working in infopath - InfoPath Dev
in

InfoPath Dev

App-config nto working in infopath

Last post 11-14-2010 06:16 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-11-2010 08:06 AM

    App-config nto working in infopath

     Hi i am using infopath 2010 and i tried using app-config in it.this is my app config

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <applicationSettings>
    <add key="spsURL" value="http://sps17/sites/IPtest/IPformtest/Lists/Project%20Initiation/AllItems.aspx" />
    </applicationSettings>
    </configuration>

    I tried to access element"spsURL" in my form code by using

    string sSPSurl = "";
                sSPSurl = ConfigurationManager.AppSettings["spsURL"]; 

    but i am getting null. Cant we use app config in infopath,if so how to use.

    Thankyou in advance

  • 11-14-2010 06:16 PM In reply to

    Re: App-config nto working in infopath

    What are you trying to accomplish?

    You can create an InfoPath form from an AppConfig XML by designing a form using the XML as a reference. This will create a normalized data source which you can then create a view around. The resulting InfoPath form will save to the app config schema and you should be able to use that to change app config settings for your app.

    Before you just go write code and get yourself into trouble, please look for a code-free solution. InfoPath solutions should be 95% code free. That means only 1 in 20 form templates will require code.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.