相关疑难解决方法(0)

ASP.net MVC3 - 具有Ajax回发的Razor视图和PartialViews

让我的工作变得非常失败!

在一个视图中......

@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)

asp.net-mvc razor asp.net-mvc-3

14
推荐指数
1
解决办法
3万
查看次数

标签 统计

asp.net-mvc ×1

asp.net-mvc-3 ×1

razor ×1