我正在使用 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)
{
}