Community discussion forum

Inserting checkbox values into one field

  • 6 months ago
    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)
    Post was edited on 05/05/2009 10:37:06 Report abuse
  • 6 months ago
    Hi, Add a single checked event handler for all check box items. convert the sender to Checkbox. like **CheckBox chk = (CheckBox)sender;** get the item name from the variable chk form the string concatenated with comma's. you may use string.format(); I think this is the way you can find form the string.

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback