2013年11月27日
摘要: http://www.cnblogs.com/mszhangxuefei/archive/2012/05/15/mvcnotes_30.html使用默认的Model Binder(Using the Default Model Binder)尽管一个应用程序有多个binders,大多数都是依赖于内置的binder类——DefaultModelBinder。这也是当action调用者找不到自定义的binder时使用的binder。默认情况下,这个model binder搜索了4个路径,如下所示: Request.Form:HTML表单提供的值 RouteData.Values:使用应用程序路由获 阅读全文
posted @ 2013-11-27 17:40 顺风车 阅读(301) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/webabcd/archive/2010/05/27/1744899.html在MVC中Controller的action方法 常用的:可选参数和参数默认值 /* * 命名参数和可选参数 * 命名参数:调用方法时,可以不按位置传递参数,而是指定参数的命名来传值 * 可选参数:声明方法中的参数时,可以为其设置默认值,那么在调用该方法时,这种可选参数是可以忽略的 */using System;using System.Collections.Generic;using System.Linq;using System.Web;using System. 阅读全文
posted @ 2013-11-27 17:37 顺风车 阅读(204) 评论(0) 推荐(0)