
MVC
文章平均质量分 65
kissjob
这个作者很懒,什么都没留下…
展开
-
初探ASP NET MVC Web Application
1. 使用Visual Studio 2008,下载ASP.NET MVC Framework2. 默认的ASP.NET MVC Project包括6个目录Controls – 放置Controller 类,处理URL 请求。Models – 放置业务实体类,表示和操作数据。Views – 放置UI 模板文件,负责展示输出结果。(MVC主要的目录)Scripts – 放置Javascr原创 2010-02-28 20:26:00 · 648 阅读 · 0 评论 -
二. ASP NET MVC
1.Controller类引用的View会自动的对应到Views/XXX目录中寻找。其中Views/Shared存放共享的试图模板。搜索顺序:首先搜索/Views/[Controller],如果找不到,再开始查找Views/Shared子目录。 2.建议:视图的模板名称和Action引用的方法名称相同。这样的话,开发人员就可以省略View Template的名称。比原创 2010-03-01 14:51:00 · 444 阅读 · 0 评论 -
三. ASP NET MVC
1.使用Partial 视图模板可以消除重复的视图逻辑,简化代码。1)Create a partial view(.ascx) 文件,把要重复使用的代码拷贝到里面。2)在主页面里面,修改为Html.RenderPartial("DinnerForm"). 2.修改Master页面(Site.master)//View/Shared提供了一个非常有效的方法在原创 2010-03-29 10:32:00 · 510 阅读 · 0 评论 -
MVC Overriew
==============ActionResult----------Method-ViewResult-EmptyResult-RedirectResult-JsonResult-JavaScriptResult-ContentResult-FileContentResult-FilePathResult-FileStreamResultpublic ActionResult Index(原创 2010-04-09 10:44:00 · 517 阅读 · 0 评论 -
Friendly URL Guide Line
1. Design URLs to describe their content, not the implementation details of yourapplication. Use /Articles/AnnualReport rather than /Website_v2/CachedContentServer/FromCache/AnnualReport.转载 2014-06-09 19:58:38 · 659 阅读 · 0 评论 -
MVC Framework Search View Path
When the MVC Framework calls the ExecuteResult method of the ViewResult object, a search willbegin for the view that you have specified. If you are using areas in your project, then the framework wi转载 2014-06-12 09:17:15 · 836 阅读 · 0 评论