Link to home
Create AccountLog in
Avatar of volking
volking

asked on

retrieve value from Web.Config

Using C#, from a WEB.CONFIG, how do I retrieve the value "Server=XYZ;Initial Catalog=ABC;User=MyName;password=pswd;" Here's the WebConfig

<?xml version="1.0"?>
     <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
     <connectionStrings>
          <add name="MyCustKey" connectionString="Server=XYZ;Initial Catalog=ABC;User=MyName;password=pswd;" providerName="System.Data.SqlClient"/>
     </connectionStrings>
</configuration>

ASKER CERTIFIED SOLUTION
Avatar of bele04
bele04

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of YZlat
are you using 1.1 or 2.0?