以 PostController 控制器的每个方法都有对应的请求方式.路由命名.URL.方法名和业务逻辑约定. HTTP请求方式 URL 控制器方法 路由命名 业务逻辑描述 GET post index() post.index 展示所有文章 GET post/create create() post.create 发布文章表单页面 POST post store() post.store 获取表单提交数据并保存新文章 GET post/{id} show() post.show 展示单个文章…
http://www.cnblogs.com/bianlan/archive/2013/01/12/2857310.html 控制器方法获取View页面传送的数据有多种方法,以Edit方法为例: 1.Form表单请求收集方式 包括Request.Form或者FormCollection. 如下: [HttpPost] public ActionResult Edit(FormCollection collection) { var album = new Album(); if (ModelSt…