验证输入正确的旧密码 [英] Validation for enter Correct old password

查看:69
本文介绍了验证输入正确的旧密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果用户未输入正确的旧密码,则限制用户.

restrict the user if user not enter correct old password.

推荐答案

请按照以下步骤操作:
1.将oldpassword texbox的AutoPostBack属性设置为true.
2.在oldpassword texbox的TextChanged事件上执行查询并检查
密码是否正确.
Follow the steps:
1. Set AutoPostBack Property of oldpassword texbox to true.
2. On TextChanged event of oldpassword texbox execute a query and check for the
password if it is correct.
SELECT COUNT(*) FROM tbUser WHERE UserID=@YourUser AND Password=@Password


3.如果查询返回0作为结果,则旧密码不正确,否则旧的
密码正确.
4.现在,如果密码正确,则可以更改密码,否则显示
消息发送给用户不正确的旧密码".




--Amit


3. If query returns 0 as result then old password is incorrect otherwise the old
password is currect.
4. Now if the password is currect, you can change the passwod otherwise show a
message to the user "Incorrect Old Password".




--Amit


您之前曾问过明确的问题.为什么现在要张贴此垃圾?这不是问题.这甚至不是一句话.如果您存储了旧密码,则可以将其与输入的密码进行比较.有什么问题?你有真正的问题吗?
You have asked clear questions before. Why post this rubbish now ? This is not a question. It''s not even a sentence. If you stored the old password, you can compare it to what they typed. What is the issue ? Do you have a real question ?


这篇关于验证输入正确的旧密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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