zoukankan      html  css  js  c++  java
  • New Features in ASP.NET MVC 3/4

    MVC 3 and 4 come with many improvements and several new features in addition to
    the new dependency on .NET 4.

    These new features include:

    ■ The Razor view engine
    ■ Package management with NuGet
    ■ Improved extensibility
    ■ Global action filters
    ■ Dynamic language features

    ■ Partial page output caching
    ■ Ajax improvements
    ■ Enhancements to the validation infrastructure
    ■ Mobile templates
    ■ Web API

    1. The Razor view engine

      This engine provides a concise way to mix code and markup within the same file.

    classic code:

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Product[]>" %>
    <ul>
    <% foreach(var product in Model) { %>
    <li><%: product.Name %></li>
    <% } %>
    </ul>

    razor code:

    @model Product[]
    <ul>
    @foreach(var product in Model) {
    <li>@product.Name</li>
    }
    </ul>
    技术改变世界
  • 相关阅读:
    react脚手架和JSX
    promise
    防抖和节流
    call/apply/bind 用法
    js this指向
    vue单页面应用刷新网页后vuex的state数据丢失的解决方案
    Echarts基础
    继承
    原型链
    vue项目中使用生成动态二维码
  • 原文地址:https://www.cnblogs.com/davidgu/p/2577869.html
Copyright © 2011-2022 走看看