我正在使用 MVC 3 和 C# 我想知道如何检索使用 POST 发送的表单的值。
她是我的代码,但不起作用,eventTitle 的值为 null。知道我在这里做错了什么吗?谢谢你的时间。
[HttpPostAttribute]
public JsonResult AddEventCustom()
{
string eventTitle = Request.Form["EventTitle"];
return Json(new { Message = "Success" }, JsonRequestBehavior.AllowGet);
}