Datagrid not shown?

Discussion in 'ASP .Net' started by WouterWeb.nl, Jan 27, 2004.

  1. WouterWeb.nl

    WouterWeb.nl Guest

    Hi there!

    I've created a 'simple' databgrid with the WebMatrix, but it will not turn
    up in the internet explorer... What's wrong?

    Here is the code:

    <%@ Page Language="VB" %>
    <%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI"
    Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral,
    PublicKeyToken=6f763c9966660626" %>
    <script runat="server">

    ' Insert page code here
    '

    </script>
    <html>
    <head>
    </head>
    <body>
    <p>
    <wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server"
    DeleteCommand="" ConnectionString="server='(local)';
    trusted_connection=true; database='wouterweb'" SelectCommand="SELECT * FROM
    [gastenboek]" UpdateCommand=""></wmx:SqlDataSourceControl>
    <asp:DataGrid id="DataGrid1" runat="server" BorderStyle="None"
    BorderWidth="1px" CellPadding="3" BackColor="White" AllowPaging="True"
    AllowSorting="True" BorderColor="#999999" DataSource="<%#
    SqlDataSourceControl1 %>" GridLines="Horizontal" AllowCustomPaging="True"
    AutoGenerateColumns="False">
    <FooterStyle forecolor="Black"
    backcolor="#CCCCCC"></FooterStyle>
    <HeaderStyle font-bold="True" font-strikeout="True"
    forecolor="White" backcolor="#000084"></HeaderStyle>
    <PagerStyle horizontalalign="Center" forecolor="Black"
    backcolor="#999999" mode="NumericPages"></PagerStyle>
    <SelectedItemStyle font-bold="True" forecolor="White"
    backcolor="#008A8C"></SelectedItemStyle>
    <AlternatingItemStyle
    backcolor="Gainsboro"></AlternatingItemStyle>
    <ItemStyle forecolor="Black" backcolor="#EEEEEE"></ItemStyle>
    <Columns>
    <asp:BoundColumn DataField="id"
    HeaderText="ID"></asp:BoundColumn>
    <asp:BoundColumn DataField="naam"
    HeaderText="Naam"></asp:BoundColumn>
    <asp:BoundColumn DataField="email"
    HeaderText="E-mail"></asp:BoundColumn>
    <asp:BoundColumn DataField="bericht"
    HeaderText="Bericht"></asp:BoundColumn>
    </Columns>
    </asp:DataGrid>
    </p>
    </body>
    </html>

    There are no ptoblem with the database...

    Many thanks!
     
    WouterWeb.nl, Jan 27, 2004
    #1
    1. Advertising

  2. WouterWeb.nl

    Michael Guest

    Perhaps you might trying doing this a more standard way rather than using
    wmx controls. It is so much easier to look at this stuff from code.

    http://aspnet.4guysfromrolla.com/articles/040502-1.aspx


    "WouterWeb.nl" <> wrote in message
    news:%...
    > Hi there!
    >
    > I've created a 'simple' databgrid with the WebMatrix, but it will not turn
    > up in the internet explorer... What's wrong?
    >
    > Here is the code:
    >
    > <%@ Page Language="VB" %>
    > <%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI"
    > Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral,
    > PublicKeyToken=6f763c9966660626" %>
    > <script runat="server">
    >
    > ' Insert page code here
    > '
    >
    > </script>
    > <html>
    > <head>
    > </head>
    > <body>
    > <p>
    > <wmx:SqlDataSourceControl id="SqlDataSourceControl1"

    runat="server"
    > DeleteCommand="" ConnectionString="server='(local)';
    > trusted_connection=true; database='wouterweb'" SelectCommand="SELECT *

    FROM
    > [gastenboek]" UpdateCommand=""></wmx:SqlDataSourceControl>
    > <asp:DataGrid id="DataGrid1" runat="server" BorderStyle="None"
    > BorderWidth="1px" CellPadding="3" BackColor="White" AllowPaging="True"
    > AllowSorting="True" BorderColor="#999999" DataSource="<%#
    > SqlDataSourceControl1 %>" GridLines="Horizontal" AllowCustomPaging="True"
    > AutoGenerateColumns="False">
    > <FooterStyle forecolor="Black"
    > backcolor="#CCCCCC"></FooterStyle>
    > <HeaderStyle font-bold="True" font-strikeout="True"
    > forecolor="White" backcolor="#000084"></HeaderStyle>
    > <PagerStyle horizontalalign="Center" forecolor="Black"
    > backcolor="#999999" mode="NumericPages"></PagerStyle>
    > <SelectedItemStyle font-bold="True" forecolor="White"
    > backcolor="#008A8C"></SelectedItemStyle>
    > <AlternatingItemStyle
    > backcolor="Gainsboro"></AlternatingItemStyle>
    > <ItemStyle forecolor="Black" backcolor="#EEEEEE"></ItemStyle>
    > <Columns>
    > <asp:BoundColumn DataField="id"
    > HeaderText="ID"></asp:BoundColumn>
    > <asp:BoundColumn DataField="naam"
    > HeaderText="Naam"></asp:BoundColumn>
    > <asp:BoundColumn DataField="email"
    > HeaderText="E-mail"></asp:BoundColumn>
    > <asp:BoundColumn DataField="bericht"
    > HeaderText="Bericht"></asp:BoundColumn>
    > </Columns>
    > </asp:DataGrid>
    > </p>
    > </body>
    > </html>
    >
    > There are no ptoblem with the database...
    >
    > Many thanks!
    >
    >
     
    Michael, Jan 27, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mitchua
    Replies:
    3
    Views:
    1,200
    Mitchua
    Jul 14, 2003
  2. Johann Blake
    Replies:
    0
    Views:
    1,359
    Johann Blake
    Jun 26, 2003
  3. Johann Blake
    Replies:
    4
    Views:
    1,536
    earbullet
    Dec 9, 2004
  4. Sky
    Replies:
    2
    Views:
    2,298
  5. Mete Akalýn
    Replies:
    1
    Views:
    438
    Mete Akalýn
    Jul 25, 2003
Loading...

Share This Page