Search code examples
asp.netfindcontrol

asp.net find control in gridview


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>

Solution

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