<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name= "Con" connectionString= "Server=.; initial catalog=my_database_in; uid=sa; pwd=sa" />
======================================================
Now Add the Code Line Below in the ".aspx.cs" file at class level
using System.Data.SqlClient;
protected SqlConnection con = new SqlConnection( System.Configuration.ConfigurationManager.AppSettings ["CON"] );
-
ShriKrishna Bhardwaj , With ASP.Net, SQL Server, Javascript
No comments:
Post a Comment