参数与值传递,提交数据.docVIP

  • 4
  • 0
  • 约6.27千字
  • 约 9页
  • 2016-11-28 发布于河南
  • 举报
参数与值传递,提交数据

mvc基础系列说谈(5)——参数与值传递,提交数据 现在添加Customer控制器,同时,在创建控制器的时候,添加Create,Delete,Detail动作。 Customer的模型结构为: Customer类:CustomerID,LastName,FirstName 现在控制器情况为:? 代码 public?class?CustomerController?:?Controller { ????????public?ActionResult?Index() ????????{ ????????????return?View(); ????????} ????????public?ActionResult?Details(int?id) ????????{ ????????????return?View(); ????????} ????????public?ActionResult?Create() ????????{ ????????????return?View(); ????????}? ????????[AcceptVerbs(HttpVerbs.Post)] ????????public?ActionResult?Create(FormCollection?collection) ????????{ ????????????try ??????????

文档评论(0)

1亿VIP精品文档

相关文档