i am having the same problem that the grid is just not showing. but it is not giving me an error message. you said you used webmatrix. i am new to this. can you please tell me how to do that? the current code that i have is :
<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>
<html>
<head>
<title>Beginning ASP.NET Databases Chapter 3</title>
</head>
<body>
<h4>First Example: Listing data from the Employees table</h4>
<asp:DataGrid id="dgNameList"
runat="server"
Gridlines="None"
BackColor="LightBlue"
CellPadding="5"
CellSpacing="5"
BorderWidth="2"
BorderColor="Black"
ToolTip="Includes only those employees who are at HQ" />
<body>
</html>
<script language="
VB" runat="server">
Sub Page_Load(Source As Object, E As EventArgs)
Dim strConnection As String = "server=(local)\NetSDK; database=Northwind; " & _
"integrated security=true"
Dim objConnection As New SqlConnection(strConnection)
Dim strSQL As String = "SELECT FirstName, LastName, Country " & _
"FROM Employees;"
Dim objCommand As New SqlCommand(strSQL, objConnection)
objConnection.Open()
dgNameList.DataSource = objCommand.ExecuteReader()
dgNameList.DataBind()
objConnection.Close()
End Sub
</script>
if you can please PLEASE PLEASE let me know how i can change this i would really appreciate it. i do have the correct systems running on my computer like they say in the book.
if you can email me a response as well so that i know that it was replied to i would really appreciate it.
i had everything working on my old computer but then i got a new one and it doesnt work anymore.
thanks again for any assistance
tiki
by the way, for the poster who needed to add a line to their web.config file to get it working, the book does state to do that. if you actually download the code from the site, it's in there as well. i dont have the book in front of me so i cant tell you what page it's on but if you want i can look it up.