jeudi 3 septembre 2015

Find out about the ID fit with what I have - as keeping content

How do you get hold of a checkbox into a Repeater, and into the checkbox must have an Id, and it is unique.

When I for example have click 2 and 5 and Update antalt by button, how have I grab checkbox, I can not do it with ordinary checkbox but can with ordinary checkbox.

shop.aspx

<asp:Repeater ID="RepeaterList" runat="server">
                <ItemTemplate>
                    <tr>
                        <td>
                            <input  id="CheckboxValue" type="checkbox" style="width: 20px;" value="<%# Eval("id") %>" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>

<asp:Button ID="ButtonUpdate" OnClick="ButtonUpdate_Click" runat="server" CssClass="butikkenClick" Text="Opdatere kurv" />

shop.aspx.cs file her:

protected void ButtonUpdate_Click(object sender, EventArgs e)
    {
    //This is where I need to find out which checkbox is click on and after I will update the content of the ID and so I have a textbox next.
    }




Aucun commentaire:

Enregistrer un commentaire