You can use ASP.NET in built Controller to validate matching password
on button click you have to check whether old password is match or not
if old password match then you can change password Using sql query
and for matching password you can use ASP.NET CompareValidator....
Code for Match password...
Password: <asp:TextBox id="TextBox1" runat="server" TextMode="Password"></asp:TextBox>
Confirm Password: <asp:TextBox id="TextBox2" runat="server" TextMode="Password"></asp:TextBox>
<asp:CompareValidator id="CompareValidator1"
runat="server" ErrorMessage="Passwords do not match!"
ControlToValidate="TextBox2"
ControlToCompare="TextBox1" ></asp:CompareValidator>