473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Datagrid not shown?

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!
Nov 18 '05 #1
1 1158
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" <wo****@wouterweb.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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!

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephen | last post by:
I've got a datagrid with a remove button and I would like to add some code in the code behind page so as whenthe button is clicked the corresponding row in the datagrid is removed. The Datagrid is...
2
by: Josef Meile | last post by:
Hi, I'm using a ComboBox, some Textboxes, and a DataGrid to represent a many-to-many relationship between Person and Course. Each time that I change the value in the ComboBox (which for now is...
3
by: Kenneth Keeley | last post by:
Hi, I have been trying to create a set of web pages that reads an xml file into a datagrid this I can do. Here is a sample of the code. DataSet myDataSet = new DataSet(); ...
3
by: Stephen | last post by:
I've got a datagrid with a remove button and I would like to add some code in the code behind page so as whenthe button is clicked the corresponding row in the datagrid is removed. The Datagrid is...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.