是否可以将确认密码文本框的文本与@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 password
并confirm password
没有得到示范确认密码属性.谢谢....