Begin by replacing the code that creates the Edit option in the Student controller listing function with the code from listing 21.
首先用清单21中的代码代替用来创建Student控制器的listing函数内的Edit选项的那些代码。
For example, to enable product editing support we can implement the HTTP-GET version of our "edit" action method on our Products controller like below and then invoke the "Add View" command.
例如,要支持产品编辑,我们可以象下面这样在Products控制器上实现“Edit”action方法的HTTP - GET版本,然后调用“添加视图”命令。
To save edit changes we can implement the HTTP-POST version of our "edit" action method on our Products controller.
要保存编辑后的改动,我们可以在Products控制器中实现“Edit”action方法的HTTP - POST版本。
应用推荐