zoukankan      html  css  js  c++  java
  • ASP.NET MVC 3 新特性

    个人做的摘记了,懒得翻译,大家自己看吧。

     

    Razor (一个集成的新的View Engine,使代码简洁了不少。)

    JavaScript Improvements

    Improved Validation

    Output Caching

    除了支持在url 或 action-method级别的支持外,新增对页面部分(partial page)的output支持(类似于以前的

    asp:Substitution控制的功能

    Previous releases of ASP.NET MVC supported output caching content at a URL or action-method level

    With ASP.NET MVC V3 we are also enabling support for partial page output caching

    Better Dependency Injection

     You can instead just register a Dependency Injection framework with ASP.NET MVC 3

    之前是需要自己去定一个类来做这个DI工作,现在只需要简单注册下类就好了。

    以下是更多的新功能:

    ASP.NET MVC 3 includes dozens of other nice improvements that help to both reduce the amount of code you write, and make the code you do write cleaner.  Here are just a few examples:

    • Improved New Project dialog that makes it easy to start new ASP.NET MVC 3 projects from templates.
    • Improved Add->View Scaffolding support that enables the generation of even cleaner view templates.
    • New ViewBag property that uses .NET 4’s dynamic support to make it easy to pass late-bound data from Controllers to Views.
    • Global Filters support that allows specifying cross-cutting filter attributes (like [HandleError]) across all Controllers within an app.
    • New [AllowHtml] attribute that allows for more granular request validation when binding form posted data to models.
    • Sessionless controller support that allows fine grained control over whether SessionState is enabled on a Controller.
    • New ActionResult types like HttpNotFoundResult and RedirectPermanent for common HTTP scenarios.
    • New Html.Raw() helper to indicate that output should not be HTML encoded.
    • New Crypto helpers for salting and hashing passwords.
    • And much, much more…

    原文来自:http://weblogs.asp.net/scottgu/archive/2011/01/13/announcing-release-of-asp-net-mvc-3-iis-express-sql-ce-4-web-farm-framework-orchard-webmatrix.aspx#7692548

  • 相关阅读:
    JeeSite信息化快速开发平台
    Redis操作使用规范
    使用Redis配置JAVA_环境
    BZOJ 1029 [JSOI2007]建筑抢修 已更新
    COJ 2108 Day7-例1
    COJ 2105 submatrix
    COJ 2106 road
    更新一下缺省源
    hiho #1055 : 刷油漆
    COJ 0047 20702最大乘积
  • 原文地址:https://www.cnblogs.com/webfpc/p/1947848.html
Copyright © 2011-2022 走看看