开发者

Can we insert Multiple check box Values in One Column?

开发者 https://www.devze.com 2023-04-03 06:44 出处:网络
i wan to insert multiple selected checkbox values to be inserted in to one column, can we do this. and if we can do it? please let me know how t开发者_JS百科o do it......

i wan to insert multiple selected checkbox values to be inserted in to one column, can we do this. and if we can do it? please let me know how t开发者_JS百科o do it......

thank you..


You could take all of the values and append them to a stringbuilder and then submit that to your db column


Use a Flags-type enum and store the integer value in the column.


If you want to want to have these 'multiple check boxes' values predefined then create a separate table for it. Otherwise if they are random, then there shouldn't be a problem. Just read them, append in a string and pass it to database.


You can use separator (like $,:,#...) to combine check boxes value and make one string and insert in to column. And when you want to retrieve that value just spilt that string.

0

精彩评论

暂无评论...
验证码 换一张
取 消