If you want to perform database operations from your ASP.NET website/application, Please use below code to connect and perform operations:
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["<<YourConnectionStringKey>>"].ToString()); SqlCommand cmd = new SqlCommand(); SqlDataAdapter da = new SqlDataAdapter(); cmd.Connection = con; cmd.CommandText = "<<Your Query Here>>" DataSet ds = new DataSet(); da.Fill(ds);
Please share your queries…if any ?
Nice!