The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

Inserting checkbox values into one field

rajupatel544

New Member
affiliate
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
 
First what you need is to resolve the check boxes priority;
Cosider

ch1 ch2 ch3

now i select ch1 and immidietly value is entered into db regardless that i have made any decicsion about ch2 and ch3

So for ch2 again the db would be updated and agin for ch3 the same

This is such an overhead.

After u done that.
take each ch's value in a session or viewstate and concatenate each with a comma sparator. Then load in the db.
 
banners
Back