Hi saas,
(1)Define the connection string in web.config file.
(2)Refer System.Data.SqlClient in your web form which you are going to create the connection
(3)Open the connection as,
SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationSe ttings.AppSettings["Connectionstring"]);
connection.Open();
nalaka hewage
|