how to bind the data form dAtabase in c#
<table id ="sample " border ="1px" visible ="false" >
<tr>
<asp:Label ID="Label13" runat ="server" Font-Bold="true" Text ='<%#Bind(CompetitionName)%>' ></asp:Label><td style="width: 100px">
</td>
<td style="width: 106px">
</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
</td>
</tr>
<tr>
<td style="width: 100px">
Venue</td>
<td style="width: 106px">
<asp:Label ID="Label14" runat ="server" Font-Bold="true" Text ='<%Bind(competitionaddress) %>' ></asp:Label>
</td>
<td style="width: 127px">
Date of Competition</td>
<td style="width: 129px">
<asp:Label ID ="Label15" runat ="server" ></asp:Label>
</td>
</tr>
开发者_Python百科 <tr>
<td style="width: 100px">
Hall Ticket No</td>
<td style="width: 106px">
<asp:Label Font-Bold="true" Font-Size="X-Large" ID="Label16" runat="server" ></asp:Label>
</td>
<td style="width: 127px">
Group</td>
<td style="width: 129px">
<asp:Label ID="Label17" runat="server" Font-Bold="true"></asp:Label>
<%--<asp:Label ID="Lable1" runat ="server" Font-Bold="true" Text ='<%Bind("GroupName")%>'></asp:Label>--%>
</td>
</tr>
<tr>
<td style="width: 100px">
Student Name</td>
<td style="width: 106px">
<asp:Label ID ="Lable18" runat ="server" ></asp:Label>
</td>
<td style="width: 127px">
Kyu</td>
<td style="width: 129px">
<asp:Label ID="Lable19" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td rowspan="3" style="width: 100px">
</td>
<td style="width: 106px">
<asp:Label ID ="Lable20" runat ="server" ></asp:Label>
</td>
<td style="width: 127px">
Franchise Name</td>
<td style="width: 129px">
<asp:Label ID ="Lable21" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td style="width: 106px">
</td>
<td style="width: 127px">
Sensei's Name</td>
<td style="width: 129px">
<asp:Label ID ="Lable22" runat ="server" ></asp:Label>
</td>
</tr>
<tr>
<td style="width: 106px">
</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 106px">
Signature of HO</td>
<td style="width: 127px">
</td>
<td style="width: 129px">
Signature of Student</td>
</tr>
</table>
<%--</asp:Repeater> --%>
if i click the Hall Ticket then the data sholud be bound to particular field...how to do friends plz help me...
You must use a control supporting DataBind, enclosing your table, like a FormView.
精彩评论