So I've used datagrids a few times, but never with a masterpagefile. I thought it would be the same, but it doesn't seem to be working for me...

<%@ Page Title="Products" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="F._Default" Debug="true" %>
<%@ Import Namespace="System.Data.OleDb" %>

<script runat="server">
    Sub Page_OverLoad()
        Dim dbconn, sql, dbcomm As Object
        dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("guitars.mdb"))
        sql = "SELECT * FROM guitars"
        dbcomm = New OleDbCommand(sql, dbconn)
        dbconn.Open()
        
        dgGuitars.DataSource = dbcomm.ExecuteReader()
        dgGuitars.DataBind()
        
        dbconn.Close()

    End Sub
</script>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:DataGrid id="dgGuitars" runat="server" 
              BackColor="#eeeeee" width="85%" 
              HorizontalAlign="Center"
              font-name="verdana" CellPadding="4" 
              Font-Size="10pt" >

                <HeaderStyle backcolor="Black" forecolor="White" font-bold="True" horizontalalign="Center" />
                <AlternatingItemStyle BackColor="White" />
            </asp:DataGrid>
</asp:Content>

I'm guessing it's something extremely simple I'm overlooking, it usually is.

while debugging did you get data back from the server?
In other words does the bold code below return anything

dgGuitars.DataSource = [B]dbcomm.ExecuteReader()[/B]

also maybe consider adding

[B]user id[/B] & [B]password[/B]

to you connection string?

Be a part of the DaniWeb community

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