forum

Home / DeveloperSection / Forums / Access textbox in itemtemplate

Access textbox in itemtemplate

Anonymous User 1563 19-Aug-2014

I have 2 textboxes and a button in a row, and a Repeater dynamically generates some rows at Page_Load function.

<asp:Repeater id="Repeater1" runat="server">
    <ItemTemplate>
        <tr>
            <td><asp:Label CssClass="form-control" disabled="true" runat="server"><%# DataBinder.Eval(Container.DataItem, "sid") %></asp:Label></td>
            <td><asp:TextBox CssClass="form-control" runat="server" ID="quiz1"></asp:TextBox></td>
            <td><asp:TextBox CssClass="form-control" runat="server" ID="quiz2"></asp:TextBox></td>
            <td><asp:Button ID="add" CommandName="add" runat="server" OnClick="addQuiz" Text="Add" CssClass="btn btn-success btn-sm form-control"/></td>
        </tr>
     </ItemTemplate>
</asp:Repeater>

How do I access the textboxes in the Repeater upon clicking the button in the row?


Updated on 19-Aug-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By