• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

ASP.NETMVC3新特性

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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

 

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

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap