How to validate the following
- by user281180
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()...