vb.net의 데이터베이스 테이블에서 데이터를 검색하는 방법. 나는 단지 빈 페이지 를 만들어 출력을하지 않는 노력 그리고 내 코드는 다음과 같음 :vb.net에서 데이터베이스의 데이터를 표시하는 방법
<% @Import Namespace="System.Data" %>
<% @Import Namespace="System.Data.SqlClient" %>
<script runat="server">
sub Page_Load()
Dim con As New SqlConnection
Dim cmd As New SqlCommand
con.ConnectionString = ///my connection string///
con.Open()
cmd.Connection = con
cmd.CommandText = "select * from det"
Dim lrd As SqlDataReader = cmd.ExecuteReader()
End sub
</script>
<form runat="server">
<asp:Repeater id="customers" runat="server">
<HeaderTemplate>
<table border="1" width="100%">
<tr bgcolor="#b0c4de">
<th>ID</th>
<th>Name</th>
<th>Address</th>
<th>Age</th>
<th>Gender</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr bgcolor="#f0f0f0">
<td><%#DataBinder.Eval(Container.DataItem, "id")%> </td>
<td><%#DataBinder.Eval(Container.DataItem, "name")%> </td>
<td><%#DataBinder.Eval(Container.DataItem, "address")%> </td>
<td><%#DataBinder.Eval(Container.DataItem, "age")%> </td>
<td><%#DataBinder.Eval(Container.DataItem, "gender")%> </td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</form>
그리고 내가 어떻게이 일을 해결하는 방법도 을 모든 출력 오류 중 하나를 얻을하지 않습니다 ???