Ray Ray - 1 year ago 96
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?

Answer Source

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" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download