我已经写在ASP.NET MVC4 /剃刀的形式。 该表格后很完善在Firefox和Chrome,但由于某种原因在Internet Explorer 10和11,“提交”按钮没有反应。 (Internet Explorer 9的作品也不错)。
这是我的看法形式的样子:
<div class="bla">
<table style="width:100%;">
@using (Html.BeginForm("MyAction","MyController", FormMethod.Post, new {id="myID"}))
{
<thead>
<tr>
<th class="heading highlight">Enter Registration</th>
<th>
<span style="display: block;">
@Html.EditorFor(model => model.Sign)
<input style="margin-left:4px;" type="submit" value="Save" />
</span>
<span style="display: block; font-weight: normal;">@(Model.SignDescription)</span>
</th>
</tr>
</thead>
}
</table>
</div>
这是我的控制器:
[HttpPost]
public ActionResult MyAction(InfoModel infoModel)
{
if(!string.IsNullOrEmpty(infoModel.Sign))
{
//do something
}
infoModel = LoadModel ();
return (indoModel);
}
我真的不知道为什么会这样?
提前致谢!
编辑:我的形式是一个表里面,我忘了补充它..