0

我正在使用 MVC BeginForm 和下面的代码,我无法在我的控制器中获取值 fpr 输入控件。我在这里做错了吗?

using (Ajax.BeginForm("CreateApp", "App",
new AjaxOptions { UpdateTargetId = "my-modal-dialog", OnBegin = "Dialog.Closing()", OnSuccess = "Dialog.Close()" },
         new
         {
             @class = "appform"
         }
        ))
{

   <input id="newAppName" type="text" size="35" value="" />
   @Html.TextBoxFor(model => model.Application.AppName);     

<input type="submit" value="Start App" class="demo-button ui-state-default ui-corner-all" />


}


My Controller looks like this
        [HttpPost]
    public ActionResult CreateApp(AppContent app, string newAppName)
    {

    }
4

1 回答 1

2

尝试改变

<input id="newAppName" type="text" size="35" value="" />

<input name="newAppName" type="text" size="35" value="" />
于 2013-02-10T00:34:10.150 回答