摘要:小弟刚学MVC3,在学习过程中遇到了很多的问题,现在把已遇到问题总结出来,以后陆续更新。方便和我一样的新手。。1.手写Model类,EF执行错误找不到表对象。[TableAttribute("ProductEntity")]public class ProductEntity{}2.加载不同的Layout,在_ViewStart.cshtml中添加逻辑@{if (Request.Url.AbsoluteUri.Contains("Manage")) { Layout = "~/Views/Shared/_MLayout.cshtml"
阅读全文
摘要:http://www.schnieds.com/2010/01/gridview-in-aspnet-mvc.htmljqGridApplication site: http://www.trirand.com/blog/Demos: http://trirand.com/blog/jqgrid/jqgrid.htmljqGrid is a very fully featured grid that supports loading data client side via AJAX (JSON) calls, paging, sorting, row editing, etc., etc.
阅读全文
摘要:微软更新速度一直都是很快,目前MVC4.0Beta已经发布了,而我还在刚刚起步MVC3.0。本文是MVC的基础,构建最简单的MVC项目。以后会陆续发布更新。开发工具:VS2010+MSSQL2005,需要使用MVC3.0环境配置第一步:到官方网站下载MVC3,提供了简体中文。先安装AspNetMVC3ToolsUpdateSetup.exe,然后安装AspNetMVC3ToolsUpdateVS11Setup.exehttp://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1491第二步:新建数据库,创建测试
阅读全文
摘要:小弟刚接触MVC3.0,虽然已有几年web开发,也使用过fckeditor,xheditor,freetext,kindeditor等html在线编辑器。但是在MVC环境下还没有使用过。今天自己折腾了好一会才解决。项目中使用的是kindeditor.第一步:首先要有kindeditor,官网下载地址:http://www.kindsoft.net/down.php,目前最新版本是4.0.5,更新时间是2012.1.15文件有600多k,但是实际使用只需要其中几个文件。解压文件后,copy 根目录2个js文件,以及themes(放的样式、图片)文件夹,plugins文件夹,lang文件夹中是语言
阅读全文
摘要:官网说明:http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper.aspx(1)ActionLink 生成一个特定的控制器行为连接 <%=Html.ActionLink("Edit", "Edit", "Book", new { id = Model.ID }, new { @class = "BookDetail"})%> 具体说明: Edit,为linkText,具体而言就是显示的字符串 Edit,对应为ActionName
阅读全文