Hi,

I have a datagrid with checkbox column inserted, it's allow user to add
serveral checked items to a cart when they click submit button, the code
looks like:

<asp:DataGrid id="Productlist" runat="server" />
<ItemTemplate> <asp:CheckBox id="Save" runat="server" /> </ItemTemplate>
</asp:DataGrid>
<html>
<asp:Button id="Submit" onclick="add_saved_items" runat="server" />
<asp:DataGrid id="mycart" runat="server" />
</html>

I think "add_saved_items" event should be like below but I don't know how to
write full code to let it works.

Sub Submit_Click (sender As Object, e As System.EventArgs)
Dim i As Integer
For i = 0 To Productlist.Items.Count - 1
Dim save As CheckBox =
CType(Productlist.Items(i).FindControl("Save"), CheckBox)
If save.Checked = True then
.................

Anyone can help me please?