【发布时间】:2013-05-09 20:13:14
【问题描述】:
我想给我的 gridview 加上一个标题,所以我做了以下事情:
<asp:GridView ID="gv_employee" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" Caption='<table width="100%" class="TestCssStyle"><tr><td class="text_Title"><asp:Label runat="server" Id="lbl_gv_title"></asp:Label></td><td><asp:ImageButton runat="server" id="ibtn_edit_master" ImageUrl="~/Images/editsmall.png" ValidationGroup="G1"></asp:ImageButton></td></tr></table>'
CssClass="forms" DataKeyNames="valueskey" HorizontalAlign="Center" OnPageIndexChanging="gv_inbox_PageIndexChanging"
OnRowCommand="gv_inbox_RowCommand" OnRowDataBound="gv_inbox_RowDataBound" TabIndex="2"
Width="600px">
</asp:GridView>
我想访问我的 gridview 标题中的标签和图像按钮来设置标签的值并处理按钮的事件,以便我可以更改标签值。如何做到这一点?
【问题讨论】:
-
你能看到标题中的控件吗?我认为服务器控件不会在字幕中起作用,至少我看不到它们。
标签: c# asp.net events gridview