<Deleetask>
<Add key = "Connect" value = "Data Source = 127.0.0.1; initial catalog = Master; user id = sa; Password = sa"/>
Webconfig Configuration:
</Appsettings>
<Connectionstrings>
<Add name = "oneconnect" providername = "system. date. sqlclient "connectionstring =" sever = 127.0.0.1; Databse = Master; uid = sa; Pwd = sa; Connect timeout = 30 "/>
<Add name = "twoconnect" providername = "system. Date. sqlclient" connectionstring = "Data Source = 127.0.0.1; initial catalog = Master; user id = sa; Password = sa"/>
<Add name = "oracle"
Connectionstring = "Data Source = test; user id = sa; Password = sa ;"
Providername = "system. Data. oracleclient"/>
<Add name = "oleconn"
Providername = "system. Data. oledb"
Connectionstring = "provider = Microsoft. Jet. oledb.4.0; Data Source = | datadirectory | northwind. mdb"/>
<Add name = "MySQL"
Providername = "mysql. Data. mysqlclient"
Connectionstring = "Server = 172.29.131.27; Port = 3311; database = comctl; persist Security info = false; user id = root; Password = 123456; allow zero datetime = true;"/>
</Connectionstrings>
Background call
String conn = configurationmanager. connectionstrings ["oneconnect"]. connectionstring. tostring ();
// String conn = configurationmanager. receivettings ["Connect"]. tostring ();
This is one of several methods.