MVC中设置为只读
2016-01-19 14:39
281 查看
1.下拉框设为只读试了试用这个有效:
2.文本框:
3.多选框
4.单选按钮
@Html.DropDownListFor(model => model.SecondDevelopment, (SelectList)ViewBag.swseconddevelopment, new { disabled = "disabled" })
2.文本框:
@Html.TextBoxFor(model => model.ProjectLeaderName, new { @readonly = "readonly" })
3.多选框
@Html.CheckBoxListFor(model => model.ProvideService, (SelectList)ViewBag.swprovideservice,null, new { @readonly = true })
4.单选按钮
@Html.RadioButtonListFor(model => model.NeedApply, (SelectList)ViewBag.swneedapplyornot, null, new { disabled = "disabled" })
相关文章推荐
- 多线程初探(六)
- Java ObjectMapper String转HashMap
- EF报LINQ to Entities 不识别方法“Web_JZRepository.Models.copy_materials_details get_Item(Int32) ”,因此该方法无法转换为存储表达式。
- 【小松教你手游开发】【unity实用技能】Unity3D中Assetbundle技术使用心得
- oracle rac linux下安装
- 关于JAVA的修饰符
- [solr] - defType - 查询权重排序
- 表单中的一些隐晦的bug
- 单点登录实现原理
- JEMETER
- Raspberry Pi Finder
- 006-LAMP_MySQL_client
- Docker网络详解及pipework源码解读与实践
- Window下让JAR成为服务运行的方法
- iOS中在tableview上通知控制键盘弹起界面上推的方法
- 解决popupWindow 中EditText点击两次才能输入的问题
- django web开发指南 (参照)
- android中提示&对话框----Notification
- 关系型数据库分库分表解决方案
- centeros下tomcat开机自启动脚本