How to validate the following
Posted
by user281180
on Stack Overflow
See other posts from Stack Overflow
or by user281180
Published on 2010-04-23T07:20:40Z
Indexed on
2010/04/23
7:23 UTC
Read the original article
Hit count: 240
mvc
I have the following code
<% using(Ajax.BeginForm("UpdatePassword", new AjaxOptions{UpdateTargetId="Password"})) { %>
<div id="Password">
<table>
<tr>
<td>New password</td><td><%=Html.Password("newPassword") %></td>
</tr>
<tr>
<td>Confirm new password</td> <td><%=Html.Password("confirmPassword")%><%= Html.ValidationMessage("confirmPassword") %>
</td>
</tr>
</table>
<% } %>
Can someone help me how to proceed to validating that the confirmPassword is equal the new password, and if not the message is displayed in the html.validationMessage()...
© Stack Overflow or respective owner