R
rob merritt
hi I have been trying to put data I retrived from a sql db into a
tabular
format I tried <asp:table , but it appears I cant databind to it so
then
I tried to use simple html <table> and bind to the page and display
the
record elements any hints for me?
<%@ Page Language="VB" Inherits="bookingFunctions"
Src="bookingCode.vb" %>
<script runat="server">
Public strQuery as String = ""
Private Sub Page_Load(sender as Object, e as EventArgs)
strQuery = "SELECT * from
mn_items,mn_records,mn_itemsStatus "
strQuery += "WHERE mid
='"&request.querystring("ItemId")&"' "
strQuery += "AND mn_items.parentrecord =
mn_records.recordid"
editDatalist.datasource = ExecuteQuery(strQuery)
editDatalist.databind()
editDatalist.datasource.close()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Table id="editTable" runat="server" GridLines="Both"
HorizontalAlign="Center" CellPadding="10">
<asp:TableRow>
<asp:TableCell>
<%# DataBinder.Eval(Container.DataItem, "itemid") %>
</asp:TableCell>
<asp:TableCell>
<input type="text" value='<%#
DataBinder.Eval(Container.DataItem, "Parentrecord") %>' />
</asp:TableCell>
<asp:TableCell>
<input type="text" value='<%#
DataBinder.Eval(Container.DataItem, "SearialNumber") %>' />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<table align="left">
<tbody>
<tr>
<th>ItemId</th>
<th>Parent record</th>
<th>Searial Number</th>
</tr>
<tr>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"itemid") %>' />
</td>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"Parentrecord") %>' />
</td>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"SearialNumber") %>' />
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
tabular
format I tried <asp:table , but it appears I cant databind to it so
then
I tried to use simple html <table> and bind to the page and display
the
record elements any hints for me?
<%@ Page Language="VB" Inherits="bookingFunctions"
Src="bookingCode.vb" %>
<script runat="server">
Public strQuery as String = ""
Private Sub Page_Load(sender as Object, e as EventArgs)
strQuery = "SELECT * from
mn_items,mn_records,mn_itemsStatus "
strQuery += "WHERE mid
='"&request.querystring("ItemId")&"' "
strQuery += "AND mn_items.parentrecord =
mn_records.recordid"
editDatalist.datasource = ExecuteQuery(strQuery)
editDatalist.databind()
editDatalist.datasource.close()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Table id="editTable" runat="server" GridLines="Both"
HorizontalAlign="Center" CellPadding="10">
<asp:TableRow>
<asp:TableCell>
<%# DataBinder.Eval(Container.DataItem, "itemid") %>
</asp:TableCell>
<asp:TableCell>
<input type="text" value='<%#
DataBinder.Eval(Container.DataItem, "Parentrecord") %>' />
</asp:TableCell>
<asp:TableCell>
<input type="text" value='<%#
DataBinder.Eval(Container.DataItem, "SearialNumber") %>' />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<table align="left">
<tbody>
<tr>
<th>ItemId</th>
<th>Parent record</th>
<th>Searial Number</th>
</tr>
<tr>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"itemid") %>' />
</td>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"Parentrecord") %>' />
</td>
<td>
<input type="text" value='<%# DataBinder.Eval(Container.DataItem,
"SearialNumber") %>' />
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>