随笔分类 - ASP.NET MVC
摘要:5个主要步骤: 1. 创建RouteTable 当ASP.NET应用程序第一次启动的时候才会发生第一步。RouteTable把URL映射到Handler。 2. UrlRoutingModule拦截请求 第二步在我们发起请求的时候发生。UrlRoutingModule拦截了每一个请求并且创建和执行合
阅读全文
摘要:URI Verb Description /api/tasksGETGets the full list of all tasks;optionally specify a filter /api/tasks/123GETGets the details for a...
阅读全文
摘要:Pure Web Service(ASMX):Starting back in 2002 with the original release of .NET, a developer could fairly easily create an ASP.NETASMX-based XML web se...
阅读全文
摘要:http://www.codeproject.com/Articles/556995/MVC-interview-questions-with-answers#What_is_razor_in_MVC
阅读全文
摘要:The caching options available in ASP.NET MVC applications don’t come from the ASP.NET MVC Framework, but from the core ASP.NET Framework.1. Request-Scoped CachingEvery ASP.NET request begins with the ASP.NET Framework creating a new instanceof the System.Web.HttpContext object to act as the central
阅读全文
摘要:一. 新建一个ASP.NET MVC4项目二. 安装Microsoft Unity 1) 管理Nuget程序包 2)安装Unity3程序包 在你的App_Start文件夹里会多出来两个文件三. 一个小例子1)创建模型类using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Data.Entity;using System.ComponentModel.DataAnnotations;namespace TestUnity.Models{ public cl...
阅读全文
摘要:Return Types of Action:1. Content()Returns a ContentResult that renders arbitrary text, e.g., “Hello, world!”2. File()Returns a FileResult that renders the contents of a file, e.g., a PDF.3. HttpNotFound()Returns an HttpNotFoundResult that renders a 404 HTTP status code response.4. JavaScript()Retur
阅读全文