如何通过提供旧密码来更改密码,以及如何匹配新密码和确认密码是否相同 [英] how to change the password by supplying old password and how to match newpassword and confirm password are same or not

查看:316
本文介绍了如何通过提供旧密码来更改密码,以及如何匹配新密码和确认密码是否相同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过提供旧密码来更改密码,以及如何匹配新密码和确认密码是否相同

how to change the password by supplying old password and how to match newpassword and confirm password are same or not

推荐答案

您可以在内置控制器中使用ASP.NET验证匹配的密码

单击按钮时,您必须检查旧密码是否匹配

如果旧密码匹配,则可以使用sql查询更改密码

对于匹配的密码,可以使用ASP.NET CompareValidator....

匹配密码的代码...

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>


使用查询字符串来匹配新旧密码.....
use query string for matching the old and new password.....


这篇关于如何通过提供旧密码来更改密码,以及如何匹配新密码和确认密码是否相同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆