Hey SP,

So I'm working on a web form for a user to update their profile. Im having problems with the validation due to the confusing logic(to me atleast lol).

The form contains a Current Password, New Password & Confirm New Password fields.

In order for the form to be successfully posted, the New Password and Confirm New Password must match(if the user wants to change his password), but it will also be optional and can be left completely blank(if he doesnt want to change his password). On top of that, his current password has to be validated server side to match in the database.

I am using JSON/AJAX and ASP.NET C#.