Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > add checked items to a cart

Reply
Thread Tools

add checked items to a cart

 
 
Adam
Guest
Posts: n/a
 
      09-17-2003
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:

<aspataGrid id="Productlist" runat="server" />
<ItemTemplate> <asp:CheckBox id="Save" runat="server" /> </ItemTemplate>
</aspataGrid>
<html>
<asp:Button id="Submit" onclick="add_saved_items" runat="server" />
<aspataGrid 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Servlet question - how to collect checked items of a checkbox list ? Daku Java 2 02-25-2010 03:59 PM
CheckBox Checked=false when checked in DataList yurps ASP .Net 1 02-29-2008 01:08 PM
Custom Validator to validate certain items checked in a checkboxli =?Utf-8?B?TWlrZSBDb2xsaW5z?= ASP .Net 3 08-10-2006 01:48 PM
[ASP/vbScript] Shopping Cart - removing items by quantity - theory.. Rob Meade ASP General 9 06-18-2006 02:14 PM
Marking CheckBoxList Items as Checked Wayne Wengert ASP .Net 7 03-02-2005 03:43 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57