随笔分类 -  MVC

摘要:一、Views文件夹 -> Shared文件夹下的 _Layout.cshtml 母版页 @RenderBody 当创建基于_Layout.cshtml布局页面的视图时,视图的内容会和布局页面合并,而新创建视图的内容会通过_Layout.cshtml布局页面的@RenderBody()方法呈现在标签 阅读全文
posted @ 2017-02-10 17:17 @大龙哥 阅读(1453) 评论(0) 推荐(0) 编辑
摘要:Controller中的数据,不管是使用的是ViewModel 还是ViewBag.Data,要将他传递到View中,这个很容易,但是如果要将它传递给JS中的某个对象,这个改如何处理呢? 后台的数据格式: public class ViewModel { public int ID { get; s 阅读全文
posted @ 2016-03-10 22:36 @大龙哥 阅读(21751) 评论(0) 推荐(0) 编辑
摘要:The examples of bootstrap table http://bootstrap-table.wenzhixin.net.cn/examples/ http://www.jq22.com/yanshi467 阅读全文
posted @ 2016-03-03 10:47 @大龙哥 阅读(1856) 评论(0) 推荐(0) 编辑
摘要:在使用MVC框架,向数据库中的表格插入一条数据时,出现以下问题:Unable to update the EntitySet '***'because it has a DefiningQuery and no element exists in the element to support the current operation.注:上面*部分标示你要插入的数据库实体类名。这个问题是在使用AdO.NET Entity Framework的时候,你使用的“XXX”这张表在数据库没有定义主键,只要设置了主键,就不会出现这个异常或这个错误了。 阅读全文
posted @ 2012-09-05 13:39 @大龙哥 阅读(2011) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示