【发布时间】:2014-11-13 14:54:21
【问题描述】:
我有一个引导模式。当我单击提交按钮时,页面会刷新并丢失模式。我想在提交按钮单击后保留模式以显示成功消息或错误消息。我是 MVC 新手我想不通。
这是我的模态
<div class="modal fade" id="signin_modal">
<div class="modal-dialog">
<div class="modal-content">
<div class=" modal-header">
Create An Account
</div>
<div class="modal-body">
@using (Html.BeginForm("Login", "Home", FormMethod.Post))
{
<table>
<tr><td>@Html.Label("username", null, new { style = " font-size:12px; font-weight:normal; font-family:consolas; " })</td></tr>
<tr><td>@Html.TextBox("name", null, new { style = " width:200px; height:30px; " })</td></tr>
<tr> </tr>
<tr><td>@Html.Label("password", null, new { style = " font-size:12px; font-weight:normal; font-family:consolas; " })</td></tr>
<tr><td>@Html.TextBox("password", null, new { style = " width:200px; height:30px " })</td></tr>
</table>
}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success">Sign in</button>
@*<button type="reset" class="btn btn-warning">Reset</button>*@
<button type="reset" class="btn btn-default">Reset</button>
</div>
</div>
</div>
</div>
【问题讨论】:
标签: javascript asp.net ajax twitter-bootstrap