Prev: the item property of the ConfigurationSectionCollection doesn'twork
Next: how to drag and drop an array of picturebox
From: sloan on 23 Feb 2010 14:11 Yeah, that example has: <configuration> <!-- Please note this is NOT the correct "2.0" way of setting up connection strings --> <appSettings> <add key="MyAppConnectionString" value="Data Source=.; Initial Catalog=Northwind; User Id=northwinduser; Password=northwindpassword; Timeout=20" /> </appSettings> </configuration> Which is a "typical" 1.1 type setup. ............... You could download this one: http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry Which has the 2.0 (and beyond) <connectionStrings></connectionStrings> in it. "sloan" <sloan(a)ipass.net> wrote in message news:u$5VNqLtKHA.3660(a)TK2MSFTNGP05.phx.gbl... > See? Putting in comments does help in the long run. > > Here are some links: > > > http://msdn.microsoft.com/en-us/library/htw9h4z3.aspx > > http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.connectionstrings.aspx > > http://www.davidhayden.com/blog/dave/archive/2007/02/22/ReadConnectionStringsWebConfigAppConfig.aspx > > > > > > "Ele" <nospam(a)nospam.com> wrote in message > news:4b8421c7$0$1120$4fafbaef(a)reader2.news.tin.it... >> "sloan" <sloan(a)ipass.net> ha scritto nel messaggio >> news:Obkh%23FJtKHA.712(a)TK2MSFTNGP04.phx.gbl... >>> The referenced assembly will have access to the presentation layer's web >>> (or app).config file. >>> You can see it in action via this example: >>> http://sholliday.spaces.live.com/blog/cns!A68482B9628A842A!140.entry >>> (Code is downloadable) >> >> Thank you, I downloaded it. I saw that you have a file app.config >> containing the configuration string. However I also see the comment: >> >> <!-- Please note this is NOT the correct "2.0" way of setting up >> connection strings --> >> >> So, if that is not the correct way, what is the correct one? I'm using >> framework 3.5. >> Thanks! :-) >> >> >> > > |