Click to See Complete Forum and Search --> : Inserting checkbox values into one field


ebosysindia
May 6th, 2009, 04:31 AM
hi

I have a checkboxes on my page (.aspx) like

checkbox1 - item1
checkbox2 - item2
checkbox3 - item3
etc

what i want is that when a user selects certain checkboxes
they should be inserted into a table called
customer which has fields (customer id and actions)

the data should be inserted as

customerid actions
1 item1,item2,item3
2 item1,item3
3 etc..

i.e all the values should be inserted into database into one field separated by commas.

Thanks

______________________
software application development (http://www.ebosys.com) | website development (http://www.ebosys.com/website-design-development-india.html) | java development (http://www.ebosys.com/offshore-java-j2ee-development.html)

Bill Crawley
May 6th, 2009, 08:15 AM
Put some code up and show us what you have done so far. We are not here to do ALL your work for you, just to help and point you in the right direction.

eclipsed4utoo
May 12th, 2009, 03:33 PM
Use the "CheckChanged" event of the checkbox. Also set the checkbox's "AutoPostback" property to True. I would also suggest using AJAX and an UpdatePanel so that the entire page doesn't do a postback.

dglienna
May 12th, 2009, 09:34 PM
hi
i.e all the values should be inserted into database into one field separated by commas.



That is the wrong way to use a database. The proper way would be to use a field for each.