Gridview RowDataBound find Html Button RRS feed

  • Question

  • User1126057398 posted

    How can One find HTML Button inside gridview in RowDataBound. I am trying to find it using HTMLINPUTControl but it didn't work.

    <asp:GridView ID="gridview1" runat="server" AutoGenerateColumns="false" ....>
                    <input type="button" id="btnSplit" value='Split' />
    </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
    HtmlInputControl btn1 = (HtmlInputControl)e.Row.FindControl("btnSplit");
            btn1.Visible = false;
    Friday, November 24, 2017 10:28 AM


  • User1126057398 posted

    Done it. Just Forgot to type in runat="server"

    <input type="button" id="btnSplit" value='Splitrunat = "server" />
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 24, 2017 10:50 AM