让我的工作变得非常失败!
在一个视图中......
@model Project.Models.Account.ForgotPasswordModel
@{
ViewBag.Title = "Forgot Password";
}
<h2>ForgotPassword</h2>
<span id='@ViewBag.ReplaceID'>
@Html.Partial("_ForgotPasswordUserNameAjax", ViewData.Model)
</span>
Run Code Online (Sandbox Code Playgroud)
我渲染这个partialView ...
@model Project.Models.Account.ForgotPasswordModel
@{
this.Layout = null;
}
@using (Ajax.BeginForm("ForgotPassword", new AjaxOptions() { UpdateTargetId = ViewBag.ReplaceID, InsertionMode = InsertionMode.InsertAfter }))
{
@Html.ValidationSummary(true, "Forgot Password was unsuccessful. Please correct the errors and try again.")
<div id="login" class="box">
<fieldset>
<h2>Account Information</h2>
<div class="inside">
<div class="editor-label">
@Html.LabelFor(m => m.Username)
</div>
<div class="editor-field">
@Html.TextBoxFor(m => m.Username)
<br />
@Html.ValidationMessageFor(m => m.Username)
<br />
</div>
<p>
<input type="submit" …Run Code Online (Sandbox Code Playgroud)