如何绑定数据到html表tds [英] How to bind data to html table tds
本文介绍了如何绑定数据到html表tds的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有10个用户和10行的表的组。
这是我的html表。我想插入例如约翰到第一史蒂夫到5等等。
我在sql server中有这个数据。
解决方案
尝试这种方式..
< table>
< asp:Repeater ID =rptrunat =server>
< ItemTemplate>
< tr>
< td>
<%#Eval(UserName)%>
< / td>
< td>
-
< / td>
< td>
<%#Eval(电子邮件)%>
< / td>
< / tr>
< / ItemTemplate>
< / asp:Repeater>
< / table>
I have HTML Table with 10 rows how i can bind data to the tds?
I have groups where is 10 users and table with 10 rows.
here Is my html table. I want to insert for example John into first Steve into 5 and so on. I have this data in sql server.
解决方案
Try this way..
<table>
<asp:Repeater ID="rpt" runat="server">
<ItemTemplate>
<tr>
<td>
<%#Eval("UserName") %>
</td>
<td>
-
</td>
<td>
<%#Eval("Email") %>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
这篇关于如何绑定数据到html表tds的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文