action代码:

BusinessPublicContent pc = db.BusinessPublicContent.Where(m => m.BusinessPublicContentID == id).FirstOrDefault();
ViewBag.data = pc; var query = from m in db.BusinessMenu
where m.Status == && m.IsDelete == && m.ParentBusinessMenuID == select new
{
BusinessMenuID = m.BusinessMenuID,
BusinessMenuName = m.BusinessMenuName
}; List<SelectListItem> items = new SelectList(query.ToList(), "BusinessMenuID", "BusinessMenuName",id).ToList(); ViewBag.items = items;

html代码:

@Html.DropDownList("mid", ViewBag.items as IEnumerable<SelectListItem>)

最新文章

  1. javaScript代码执行顺序
  2. JavaScript Patterns 5.7 Object Constants
  3. 文件上传和下载(可批量上传)——Spring(二)
  4. nodejs将PDF文件转换成txt文本,并利用python处理转换后的文本文件
  5. pip安装使用详解
  6. linux 下安装rsync
  7. js小分享
  8. poj1623 Squadtrees
  9. LeeCode-Invert Binary Tree
  10. codeforces 597B Restaurant
  11. Struts2第五篇【类型转换器、全局、局部类型转换器】
  12. HashSet实现不重复储值原理-附源码解析
  13. Java 8的用法(泛型接口,谓词链)
  14. PLSQL创建Oracle定时任务
  15. PYthon3:简单几步实现冒泡排序
  16. varnish 相关说明
  17. topological sort
  18. Zookeeper-watcher机制源码分析(一)
  19. Keepalived+LVS高可用负载均衡集群
  20. PHP自定义curl请求

热门文章

  1. 源码分析-AutoCloseable
  2. Typescript学习笔记(一)基础类型
  3. Building real-time dashboard applications with Apache Flink, Elasticsearch, and Kibana
  4. 译:Spring Boot 自动伸缩
  5. react-native中的TextInput
  6. linux服务器上tomcat日志中的中文乱码
  7. hystrix实战
  8. springcloud使用zookeeper作为config的配置中心
  9. Map的嵌套
  10. go 实现用户特权判断的例子