hello

Saturday, 23 July 2011

WEB CONFIG CONNECTION STRING SET:

    <appSettings>
        <add key="strLocalCon" value="Data Source=ABC\SQLEXPRESS;Initial Catalog=ABC;Integrated Security=True"/>
    </appSettings>
    <connectionStrings>
        <add name="conn" connectionString="Data Source=ABC\SQLEXPRESS;Initial Catalog=ABC;Integrated Security=True"/>

    </connectionStrings>

USE:
SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["conn"].ToString());
  

No comments:

Post a Comment