bind Checkboxes
-
Im having around 30 Checkboxes in page i need to insert name of those checkboxes in a single column(seperated by comma) of table into db and also need to bind them from db how can i do it in simple way....
-
Im having around 30 Checkboxes in page i need to insert name of those checkboxes in a single column(seperated by comma) of table into db and also need to bind them from db how can i do it in simple way....
I think you can use a CheckBoxList for this. Just get the items from the database, split it on "," and get a array/collection and bind it in.. BTW, why would you want to save the names of checkboxes to the db?? It should be a pre-defined list editable through the DB or other means only.
-
Im having around 30 Checkboxes in page i need to insert name of those checkboxes in a single column(seperated by comma) of table into db and also need to bind them from db how can i do it in simple way....
in CS page split it with ',' and using for loop bind the each checkbox. now when you want to save in DB again using loop, save in one string (comma separated)(both Id and Text), pass this string to DB and using while loop split it with comman and update the text with particular Id. let me know if you have any issues.
Regards Keyur Satyadev