var connectionString="Persist Security Info=False;Integrated Security=true;Initial Catalog=Northwind;server=(local)";
var con=new SqlConnection(connectionString);
try to read
this for you to know the basic in connection string.
you can also set it in web config
<appsettings>
<add key="myConnectionString" value="server=localhost;database=myDb;uid=myUser;password=myPass;" />
</appsettings>
string connStr = ConfigurationSettings.AppSettings("myConnectionString");
make
this as reference. . :)