在网格视图中添加控件 [英] Adding control in a grid view
本文介绍了在网格视图中添加控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在网格视图中添加标签控件.
How can i add lable control in a grid view.
推荐答案
您好,您想在运行时添加标签控件.
检查下面的链接.
http://support.microsoft.com/kb/317794
祝一切顺利
试试这个代码
Hi you want add label control in runtime right.
check below link for it.
http://support.microsoft.com/kb/317794
All the best
Try this code for it
<asp:DataList ID="DataList1" runat="server">
<HeaderTemplate >
<table width="100%" align="center">
<tr>
<td>Answers</td>
<td>Views</td>
<td>Question</td>
</tr>
</HeaderTemplate>
<itemtemplate>
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text='<%#Eval("ans") %>'></td>
<td>
<asp:Label ID="Label3" runat="server" Text='<%#Eval("views") %>'></td>
<td><%#Eval("qname") %></td>
</tr>
</itemtemplate>
<footertemplate>
</footertemplate></table>
这篇关于在网格视图中添加控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文