SqlConnection constr= new SqlConnection(@"Data Source=.\SQLEXPRESS; Integrated Security=True ; Database=abc"); string conn = constr.ToString(); return conn;
constr
string
constr.ConnectionString.Tostring()
String cs = //Yours connection string
SqlConnection Con = new SqlConnection(cs);
SqlConnection
public string Connect() { return System.Configuration.ConfigurationManager.AppSettings["conn"]; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)