更改密码控件如何显示成功消息? [英] How change password controle can show success message?

查看:61
本文介绍了更改密码控件如何显示成功消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我是asp.net平台的新手.我正在申请应用程序,需要更改密码.我使用了ASP.NET本机控件,但是更改密码后却无法获得密码更改成功消息.
这是我的代码:

Dear All,

I am new in asp.net platform. I was working on application were I need change password. I used ASP.NET native control but I am unable to get password change success message while the password get changed.
This is my code:

protected void ChangePassword1_ChangingPassword(object sender, LoginCancelEventArgs e)
       {
           ds=DataLayer.dset("select password from login where UserID="+UserID+"","password");
               string password=ds.Tables["password"].Rows[0][0].ToString();
               if (ChangePassword1.CurrentPassword != password)
               {
                   ChangePassword1.PasswordHintText = "Current Password does not match";
               }
               else
               {                   DataLayer.selectStoreProcedure("sp_UpdatePassword", UserID, ChangePassword1.NewPassword.ToString(), 1);
                   ChangePassword1.SuccessText="Password Successfully Changed";
                   if (ChangePassword1.CurrentPassword != null)
                   {

                   }
               }
       }

推荐答案

在更改密码后我无法获取密码更改成功消息

好吧,您如何确定更改密码?您是否尝试过调试?
根据您的代码,更新SP中可能存在一些错误.

此外,要查看ChangePassword控件的工作原理的确切代码,请查看以下文章:
Artilce 1 [第2条 [
I am unable to get password change success message while the password get changed

Well, how are you sure enough that password got changed? Did you tried Debugging?
Based on your code, it might be there was some error in update SP.

Further, to have a look at exact code of how ChangePassword control works, have a look at these articles:
Artilce 1[^]
Article 2[^]


这篇关于更改密码控件如何显示成功消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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