Ray Ray - 1 month ago 5x
ASP.NET (C#) Question

Setting up connection string in ASP.NET to SQL SERVER

I'm trying to set up a connecting string in my web.config file (Visual Studio 2008/ASP.NET 3.5) to a local server (SQL server 2008).

In my web.config, how and where do I place the connection string?


You can also use this, it's simpler. The only thing you need to set is "YourDataBaseName".

    <add name="ConnStringDb1" connectionString="Data Source=localhost;Initial Catalog=YourDataBaseName;Integrated Security=True;" providerName="System.Data.SqlClient" />