随笔分类 - MVC
摘要:一、题外话接续上一篇:MVC中Action参数绑定的过程 public IModelBinder DefaultBinder{ get { if (this._defaultBinder == null) { this._defaultB...
阅读全文
摘要:一、题外话 上一篇:MVC中Action的执行过程ControllerContext封装有了与指定的 RouteBase 和 ControllerBase 实例匹配的 HTTP 请求的信息。 二、Model绑定者2.1相关说明http请求中的参数绑定到Model,是由实现了IModelBinde...
阅读全文
摘要:一、从MvcHandler开始(不要觉得是代码,让你看懂才是最重要的)using Microsoft.Web.Infrastructure.DynamicValidationHelper;using System;using System.Collections.Generic;using Syst...
阅读全文
摘要:1.在页面上显示字符串的值,格式:a*@变量名但@之前必须有空格,{、}等,使得a*不可以构成变量的字符.(图1.1,此种格式razor引擎不会解析该变量)(图1.2 razor引擎不会解析该变量)--------------------------ps:显示的格式如下:--------------...
阅读全文
摘要:1.Bootstrap使用教程相关教程:http://www.bootcss.com/components.html页面使用代码:2.angularjsvarapp = angular.module("ControlState", []);app.controller("Home/Login",function($scope,$window) {$scope.login =function(user) {varurl="@Url.Action("Login","Home")";$.post(ur
阅读全文
摘要:配置文件(注意修改 AUTO_COMPLIE_DIRECTORY_PATH 的值为 实际项目的bin路径) 数据库代码/* * 由SharpDevelop创建。 * 日期: 2013-4-20 * 时间: 9:23 * * ...
阅读全文
摘要:@RenderSection在布局页中占位,此布局页的子页自己去定义自己的呈现块section。@RenderSection在布局页中占位,此布局页的子页自己去定义自己的呈现块section。子页面@section SubMenu{ Hello This is a section implement in About View.} @if (IsSectionDefined("SubMenu")) { @RenderSection("SubMenu", false)//为了防止因缺少节而出现异常,可以给RenderSection()提供第2个参数 } e
阅读全文