有谁能告诉我如何在mvc 4中使用checkboxlist? [英] can anyone tell me please how to use checkboxlist in mvc 4?

查看:75
本文介绍了有谁能告诉我如何在mvc 4中使用checkboxlist?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几张与外键有关系的广告,现在问题是我的视图有下拉列表但我想要复选框列表,我可以从中选择多个项目并存储在数据库中....

记住我有员工表和项目表,在这个项目中是外键表,员工是主表,现在我想在项目索引页面上的复选框列表中显示每个员工姓名,我可以从中选择多个员工并存储在DATABSE。

谢谢

解决方案

有什么问题吗?然后阅读 System.Web.UI.WebControls.CheckBoxList 上的MSDN文档,解释绰绰有余:

http://msdn.microsoft.com/en-us/library/system .web.ui.webcontrols.checkboxlist%28v = vs.110%29.aspx [ ^ ]。



< DD> -SA

i have few tables ad that have relationship with foreign key,now the problem is my view has dropdownlist but i want checkbox list from which i can select multiple item and store in the database....
remember that i have employee table and projects table and in this projets is foreign key table and employee is primary table andnow i want to display each employee name in checkboxlist on the project's index page from which i can select multiple employee and store in the databse.
thank you

解决方案

Any problem with that? Then read MSDN documentation on System.Web.UI.WebControls.CheckBoxList, explaining more than enough:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.checkboxlist%28v=vs.110%29.aspx[^].

—SA


这篇关于有谁能告诉我如何在mvc 4中使用checkboxlist?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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