多个复选框控件选择 [英] Multiple checkbox control selection

查看:113
本文介绍了多个复选框控件选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要一个示例代码来选择c#中的多个复选框.

我有一个带有多个复选框控件和一个按钮的asp.net Web表单.
在多个复选框中,我有4个项目,例如admin,Users,Employees,students.
如果我选择一个或两个类似的复选框,然后单击提交"按钮,我想将所选值保存到数据库中.

谁能帮我提供示例代码.

谢谢您,

Hi,

I need a sample code for multiple checkbox selection in c#.

I have an asp.net web form with multiple checkbox control and a button.
In multiple checkbox I have 4 items like admin,Users,Employees,students.
If I select one or two like check-boxes and if I click submit button,I want to save the selected values to be stored in Database.

Can anyone help me with a sample code.

Thank you,

推荐答案

看看这篇文章,其中介绍了选定的值并显示出来:http://www.codeproject.com/Articles/29663/Multiselect-Dropdown-for-Web-Applications [简单ADO.NET数据库读取,插入,使用C#更新和删除. [ ^ ]
Have a look at this article that pulls in the selected values and displays it: http://www.codeproject.com/Articles/29663/Multiselect-Dropdown-for-Web-Applications[^]

You would need ADO.NET to save the data into database. Look here: Simple ADO.NET Database Read, Insert, Update and Delete using C#.[^]


这篇关于多个复选框控件选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆