Hi All,
I downloaded the example with SQL db for filtering from the adres below

And when I tried to run it from VS2008, I got this error
"The connection name 'NorthwindConnectionString' was not found in the applications configuration or the connection string is empty"

I already downloaded msi setup Northind database for SQL (2000 version, but I know this does not matter).

I got some questions,

and there is no sql related code in web.config. Do I need it define in web.config file ??

there are some conneciton strings in the aspx code like this one,

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
            SelectCommand="SELECT [CompanyName], [ContactName], [ContactTitle], 
            [Country], [Phone], [Address], [City] FROM [Customers]">

Is that enough ? I mean is that will be enough for this code to get work out ?

Recommended Answers

All 2 Replies


No web.config is found in the sample project downloaded from the above link.

You need to add a web.config and add connection string as below:

   <add name="NorthwindConnectionString" connectionString="Data Source=serverName;Initial Catalog=Northwind;User ID=userName;Password=password" providerName="System.Data.SqlClient"/>

You need to specify the correct server name, database, user id and password etc in the connection string.

Thanks, I have solbve the problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.