C# code:
SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["sqlcon"].ToString());
cn.Open();
web.config:
<connectionStrings>
<add name="sqlcon" connectionString="Data Source=MALLISBOOK\SQLSERVER2012;Initial Catalog=dbprogrames;Integrated Security=True;User id=sa;Password=123;" providerName="System.Data.SqlClient" />
<!---->
</connectionStrings>
0 comments:
Post a Comment