Mvc提交

Controller

 [ValidateAntiForgeryToken]
 [HttpPost]
 public ActionResult Index(FormCollection focm)
 {
     string name = focm["Name"];
     ViewBag.Message = name;
     return View();
 }

View

<div>欢迎 @ViewBag.Message 先生</div>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken();    
    @Html.Label("姓名:")
    @Html.TextBox("name");
    <input type="submit" value="确定" />
}
原文地址:https://www.cnblogs.com/gobuild/p/4913056.html