Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > What is wrong with the data binding?

Thread Tools

What is wrong with the data binding?

Ben L
Posts: n/a
I'm just following along with the video tutorials on the website. I'm
data binding a to datagrid using the northwind.mdf file. I run a test query
in the query builder and everything is fine, I see the correct results.
Then I 'open in browser' to see the results, and the data grid never
I even make the query set to show everything, and I get nothing.

But if I just drag in the table with no query, I do see the results in the
web browser.
What am I doing wrong?


Reply With Quote
Ben L
Posts: n/a
<form id="form1" runat="server" method="post">
<h2 align="center">
View Your orders</h2>
<p id="P1">

<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
EmptyDataText="There are no data records to display.">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString1 %>"
ConnectionStrings:NORTHWNDConnectionString1.Provid erName %>"
SelectCommand="SELECT [OrderID], [CustomerID], [EmployeeID],
[OrderDate], [Freight], [ShippedDate] FROM [Orders]">


and in web.config

<?xml version="1.0"?>
<configuration xmlns="">
<add name="ASPNETDBConnectionString1" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="NORTHWNDConnectionString1" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\NORTHWND.MDF;Integrated
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<compilation debug="true" />
<authentication mode="Forms" />
<smtp from="ASPWEBBY">
<network host="" password="aaa" userName="human"

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP PORT command sends the wrong IP address for data channel over VPN Cisco 0 05-03-2005 08:57 PM
SDLC STUN local ack - R R 00 data from wrong address! Mark Cisco 0 04-26-2005 11:27 AM
Big Problem with Web App Sending Wrong Data! HELP! David Hearn ASP .Net 0 04-18-2005 08:55 PM
Is XML Doc wrong or is Schema wrong? (or both) Matthew XML 7 01-07-2005 10:05 PM
Dropdown displaying data in the wrong order Irishmaninusa ASP .Net 2 08-27-2004 09:30 PM