Asp.net mvc 在MVC5项目调试器中查看Request.Form值

Asp.net mvc 在MVC5项目调试器中查看Request.Form值,asp.net-mvc,asp.net-mvc-5,visual-studio-debugging,Asp.net Mvc,Asp.net Mvc 5,Visual Studio Debugging,我已经在我的动作控制器上设置了一个断点,并将Request.Form添加到监视列表中 在调试器中,我只能看到表单键。如何访问调试器中的值?为什么不为此使用FormCollection或强类型模型?比如说: [HttpPost] public ActionResult SubmitAction(FormCollection form) { // Get Params string var1 = form["var1"]; string var2 = form["var2"]

我已经在我的动作控制器上设置了一个断点,并将Request.Form添加到监视列表中


在调试器中,我只能看到表单键。如何访问调试器中的值?

为什么不为此使用FormCollection或强类型模型?比如说:

[HttpPost]
public ActionResult SubmitAction(FormCollection form)
{
    // Get Params
    string var1 = form["var1"];
    string var2 = form["var2"];
    // ...

    return View(form);
}
或许是这样:

[HttpPost]
public ActionResult SubmitAction(SomeModel model)
{
    // Get Params
    string var1 = model.Property1;
    string var2 = model.Property2;
    // ...

    return View(model);
}