Reply
Inserting checkbox values into one field
Old 05-04-2009, 04:35 AM Inserting checkbox values into one field
Novice Talker

Posts: 6
Name: Ebosys India
Trades: 0
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

Last edited by ebosysindia; 05-04-2009 at 04:36 AM.. Reason: remove space
ebosysindia is offline
Reply With Quote
View Public Profile Visit ebosysindia's homepage!
 
 
When You Register, These Ads Go Away!
Old 05-04-2009, 10:13 AM Re: Inserting checkbox values into one field
Skilled Talker

Posts: 69
Trades: 0
So are you looking for someone to write the whole thing for you or is there a specific question you are asking.

You won't find anyone here willing to write the whole thing for you, we are here to help, not do your job for you.
stbuchok is offline
Reply With Quote
View Public Profile
 
Old 07-17-2009, 01:52 PM Re: Inserting checkbox values into one field
Experienced Talker

Posts: 31
Trades: 0
Here is some pseudo code to get you started.

On submit of form

for each in checkbox list
if checkbox is checked
stringactions &= stringaction + checkbox.value
end if
next

database insert statement here

This code could also run on checkboxchanged event as well, but that is a bit inefficient.
__________________
textbox advertising agency
textbox is offline
Reply With Quote
View Public Profile Visit textbox's homepage!
 
Reply     « Reply to Inserting checkbox values into one field
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10612 seconds with 13 queries