在ASP.NET MVC中为DropDownList 绑定数据库的值
来源:互联网 发布:python打印百分数 编辑:程序博客网 时间:2024/06/05 22:48
<%:this.Html.DropDownList("hrclass",ViewBag.hrclass as IEnumerable<SelectListItem>) %>
LianXiEntities lianxi = new LianXiEntities();
var user2 = from c in lianxi.T_BuMen
select c;
List<SelectListItem> item1 = new List<SelectListItem>();
foreach (var it in user2)
{
item1.Add(new SelectListItem { Text = it.BuMen, Value = it.Id });
}
ViewBag.hrclass = item1;
0 0
- 在ASP.NET MVC中为DropDownList 绑定数据库的值
- asp.net mvc Dropdownlist的使用绑定
- 在ASP.NET MVC中使用DropDownList
- 在ASP.NET MVC中使用DropDownList
- 在ASP.NET MVC中使用DropDownList
- 在ASP.NET MVC中使用DropDownList
- ASP.NET MVC中DROPDOWNLIST的使用
- ASP.NET MVC中DropDownList的使用
- asp.net mvc Dropdownlist获取数据库中某字段的值
- 绑定access数据库,asp.net 中 以DropDownList为查询条件 ,前台实现数据查询
- ASP.NET MVC 八 DropDownList数据绑定
- asp.net mvc 绑定DropDownList或select
- ASP.net中在gridview中绑定dropdownlist控件
- 详解ASP.NET MVC中DropDownList的使用
- 详解ASP.NET MVC中DropDownList的使用
- 详解ASP.NET MVC中DropDownList的施用
- MVC DropdownList 怎么绑定数据库中的值
- asp.net的DropDownList通用绑定代码
- TCP协议疑难杂症全景解析
- Exception 例外處理
- JAVA程序员面试32问
- ubuntu下手动编译安装mysql笔记
- Delphi的学习笔记——内存操作函数
- 在ASP.NET MVC中为DropDownList 绑定数据库的值
- RAC维护手记02-VotingDisk 恢复/增/删/迁移
- <c:forEach>嵌套<c:forEach>
- 职场交际中你是否缺点什么!
- voip 软电话 csipsimple
- 目标的积累
- git 环境的设置
- 黑马程序员_模拟交通等笔记整理
- 星际译王安装