Asp.net 2.0
<connectionStrings>
<add name="ConnString" connectionString="Data Source=ServerName;Initial Catalog=DBNAME;Integrated Security=True;" providerName="System.Data.SqlClient"/>
connectionStrings>
Code Behind
Dim con As String = System.Configuration.ConfigurationManager.ConnectionStrings("ConnString").ConnectionStringAsp.net 1.1
<appSettings>
<add key="ConnString" value="Data Source=ServerName;Initial Catalog=DBNAME;Integrated Security=True;" providerName="System.Data.SqlClient"/>
appSettings>
Code Behind:
Dim con2 As String = System.Configuration.ConfigurationSettings.AppSettings("ConnString")
No comments:
Post a Comment