I'm just following along with the video tutorials on the asp.net 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
appears.
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?
Thanks,
Ben.
let's see the code. Couple things you can check before - check for
ispostback, check to make sure data is in the dataset.

Signature
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
> I'm just following along with the video tutorials on the asp.net website.
> I'm
[quoted text clipped - 11 lines]
> Thanks,
> Ben.
Ben L - 16 May 2006 21:51 GMT
</head>
<body>
<form id="form1" runat="server" method="post">
<div>
<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:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NORTHWNDConnectionString1 %>"
ProviderName="<%$
ConnectionStrings:NORTHWNDConnectionString1.ProviderName %>"
SelectCommand="SELECT [OrderID], [CustomerID], [EmployeeID],
[OrderDate], [Freight], [ShippedDate] FROM [Orders]">
</asp:SqlDataSource>
</p>
</div>
</form>
</body>
</html>
and in web.config
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="ASPNETDBConnectionString1" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="NORTHWNDConnectionString1" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated
Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" />
<authentication mode="Forms" />
</system.web>
<system.net>
<mailSettings>
<smtp from="ASPWEBBY">
<network host="smtp.msn.com" password="aaa" userName="human"
/>
</smtp>
</mailSettings>
</system.net>
</configuration>