In this article I will explain how to use changepassword control to change password in asp.net membership provider.
Description:
In previous posts I explained clearly how to create users using createuserwizard or programmatically create users using asp.net membership and I explained how to get forgot password through email. In previous post Get forgot password through mail it will reset our password and sent randomly generated new password through mail. It’s very hard to remember randomly generated password. If we allow users to change their passwords directly that is very convenient. We can achieve this one easily by using changepassword control asp.net membership.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Change Password</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ChangePassword ID="ChangePassword1" runat="server" DisplayUserName="True">
</asp:ChangePassword>
</div>
</form>
</body>
</html>
|
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</profile>
<roleManager enabled="true">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="dbconnection" applicationName="SampleApplication"/>
</providers>
</roleManager>
|
![]() |
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|
|

Subscribe by RSS
Subscribe by Email
10 comments :
Thanks
Nice Post Brother.............keep on going
sir u saved my ass..
thanx a ton..;)
Good Post
How do i make it work with my custom database structure?
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The configuration section cannot contain a CDATA or text element.
Source Error:
Line 50:
Line 51: "/>
Line 53:
Line 54:
Hello Sir,
I liked your article. But i have to do the same but without using membership. can you please explain me how to do this or give some related article?
Hi, this is a useful expert issue.
Nice post