InfoPath and .NET - InfoPath Dev Sign in | Join | Help in General InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » General » InfoPath and .NET InfoPath and .NET Last post 05-15-2005 09:53 PM by liorlankri. 12 replies. Page 1 of 1 (13 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 04-07-2005 10:26 AM liorlankri Joined on 02-27-2005 Posts 205 InfoPath and .NET Reply Contact I have an Infopath project in VS.NET, My solution contains the Form project and web reference to the web service. I defined in the web service-> properties -> URL Behavior=Dynamic. That's action create to me this line in the App.confige file: <add key="MyWebService" value="http://MyServer/FolderName/service1.asmx" />When I added the web reference I get file called reference.cs whitch contain this code:public Service1() { string urlSetting = System.Configuration.ConfigurationSettings.AppSettings["MyWebService"]; if ((urlSetting != null)) { this.Url = string.Concat(urlSetting, ""); } else { this.Url = "http://MyServer/FolderName/service1.asmx "; } }This code supposed to search the key "MyWebService" in the App.config and to get it's value. But it's not work. When I debug it I see that the "if" condition not happen and it's go to the "else" section. I want that the Web service URL will be taken from the key in the App.config!!!!!By the way this is the way I create the web service in my codeWSname.Service1 s=new WSname.Service1();How to do it?? 04-10-2005 03:27 PM In reply to Shanthi Reddy Joined on 08-21-2006 Posts 144 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact In InfoPath the way to set any data is to put it in a seconary DOM and read that data. This data can be changed easily by exporting it out changing the data and importing it back in.About having a config file to have this data -> the App.Config file for a regular C# code is renamed as app.exe.config, For an Infopath solution the C# code is made into a dll. You can try by renaming the file to app.dll.config and checking if that works. This is just an idea to try out, I personally have not tried this and cannot say for sure that it will work.ShanthiInfoPathDev India Shanthi Reddy 04-12-2005 02:36 AM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact It's not help 04-12-2005 07:23 AM In reply to Shanthi Reddy Joined on 08-21-2006 Posts 144 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact You can have the URL in a secondary dom. OnLoad of the solution get the data from the secondary DOM and then set the URL for "s" using this. This is a much better way than to have the URL in app.config for an InfoPath solution.ShanthiInfoPathDev India Shanthi Reddy 04-12-2005 11:58 PM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact How to create the secondery DOM ? 04-18-2005 12:48 PM In reply to Shanthi Reddy Joined on 08-21-2006 Posts 144 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact Add a Dataconnection to an xml file which contains this data.ShanthiInfoPathDev India Shanthi Reddy 05-08-2005 03:19 AM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact Can you send to me the code of this xml file, please? 05-08-2005 03:43 AM In reply to Agni Jonnalagadda Joined on 12-15-2004 India Posts 617 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact This can be your xml file<ConfigurationXML> <URL>http://MyServer/FolderName/service1.asmx</URL></ConfigurationXML>AgniInfoPathDev India Agni / http://www.ggktech.com 05-11-2005 01:39 AM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact I created the Dataconnection to this xml file. What to do next? how to use thid Dataconnection in my form? 05-11-2005 10:30 AM In reply to Patrick Halstead Joined on 08-07-2006 Posts 5,112 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact It's easy, just select it in the Data Source drop down and start binding UI controls to it. Or, you can access it via your code.Patrick Halstead [InfoPath MVP]InfoPathDev Patrick HalsteadProject Manager at Qdabra 05-14-2005 09:38 PM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact I dont understand how. How to conect the drop down to it??? I need specific method int the web service and the XML file is contain only URL to this web service!!!How to do it via code?? 05-15-2005 10:12 AM In reply to Patrick Halstead Joined on 08-07-2006 Posts 5,112 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact Liorlankri, are you expecting us to answer every simple question you ask? You can figure these out on your own. We are not here to show you how to do everything.Patrick Halstead [InfoPath MVP]InfoPathDev Patrick HalsteadProject Manager at Qdabra 05-15-2005 09:53 PM In reply to liorlankri Joined on 02-27-2005 Posts 205 Re: InfoPath and .NET Mark as Not AnswerMark as Answer... Reply Contact O.K! Page 1 of 1 (13 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.