G
Griff
Hi
Bit confused about how to read a connection string from my web.config...I
need to hold this data in a particular section (v2.0 specific).
Extract from web.config:
-------------------------------------
<configuration>
<configSections>
<sectionGroup name="OurCompanyName">
<section name="OurApplicationName"
type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
<OurCompanyName>
<OurApplicationName>
<add
name="OurDatabaseName"
connectionString="Server=localhost;User
ID=xxxx;Password=xxxx;Database=xxxx;Persist Security Info=True;async=true"
providerName="System.Data.SqlClient" />
</OurApplicationName>
</OurCompanyName>
......
<appSettings/>
<connectionStrings/>
<system.web/>
</configuration>
-------------------------------------
I just can't get the code right for extracting this information....
Many thanks in advance
Griff
Bit confused about how to read a connection string from my web.config...I
need to hold this data in a particular section (v2.0 specific).
Extract from web.config:
-------------------------------------
<configuration>
<configSections>
<sectionGroup name="OurCompanyName">
<section name="OurApplicationName"
type="System.Configuration.NameValueSectionHandler"/>
</sectionGroup>
</configSections>
<OurCompanyName>
<OurApplicationName>
<add
name="OurDatabaseName"
connectionString="Server=localhost;User
ID=xxxx;Password=xxxx;Database=xxxx;Persist Security Info=True;async=true"
providerName="System.Data.SqlClient" />
</OurApplicationName>
</OurCompanyName>
......
<appSettings/>
<connectionStrings/>
<system.web/>
</configuration>
-------------------------------------
I just can't get the code right for extracting this information....
Many thanks in advance
Griff