asp.net find control in gridview

拟墨画扇 提交于 2019-12-11 02:23:40

问题


How do I use find control to access Label4?

Thanks for any help you can provide :)

<asp:GridView ID="grdView" runat="server"  OnSelectedIndexChanged="viewBLOG" GridLines="None"  AllowPaging="true"  CssClass="mGrid"  PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt">
    <Columns>
        <asp:ButtonField ButtonType="Button" CommandName="Select" HeaderText="View Sprint Backlog" ShowHeader="True" Text="View" />
        <asp:TemplateField HeaderText="Status">
            <ItemTemplate>
                <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>

回答1:


This post on the ASP.NET forum answer exactly your question with a sample very similar to yours :)



来源:https://stackoverflow.com/questions/4356552/asp-net-find-control-in-gridview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!