小编Vis*_*ara的帖子

在ASP.Net MVC中比较密码和确认密码

是否可以将确认密码文本框的文本与@Html.PasswordFor(model=>model.Password)?进行比较 ?

@using (Html.BeginForm())
{
    <table>

        <tr>
            <td>@Html.LabelFor(model => model.Password)</td>
            <td>@Html.PasswordFor(model => model.Password)</td>
            <td>@Html.ValidationMessageFor(model => model.Password)</td>
        </tr>
        @*Here I want to take "Confirm Password" and want to compare it with "Password" in View(.cshtml only) as
          I have not taken ConfirmPassword in my model.*@
        <tr>
            <td>
                <input type="submit" value="Create" />
            </td>
        </tr>
    </table>              
}
Run Code Online (Sandbox Code Playgroud)

请建议任何方式或解决方案,

如何compare passwordconfirm password没有得到示范确认密码属性.谢谢....

asp.net-mvc asp.net-mvc-4

17
推荐指数
4
解决办法
3万
查看次数

标签 统计

asp.net-mvc ×1

asp.net-mvc-4 ×1