Change Password and Password Recovery Controls in Sitefinity

Change Password and Password Recovery Controls in Sitefinity

December 12, 2008 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

Although the Change Password and the Password Recovery controls, from Visual Studio, were not included with Sitefinity, you can create them yourself. First, make a user control and place a Password Recovery and a Change Password control on it. In this case, I will call them PasswordRecovery1 and ChangePassword1. Then, go into the code-behind and make public properties for each control. Here is a code sample:

 

public partial class UserControls_PasswordRecovery : System.Web.UI.UserControl 
    //Make the public property of type Password Recovery, so you can  
    //read, edit, update and delete its properties without entering Visual Studio 
    public PasswordRecovery PasswordRecovery 
    { 
        get 
        { 
            //Get the instance of the password recovery control in the .ascx file 
            return this.PasswordRecovery1; 
        } 
        set 
        { 
            //Update properties, based on values from the password recovery control in the .ascx file 
            this.PasswordRecovery1 = value; 
        } 
    } 
 
    //Make the public property of type Change Password, so you can  
    //read, edit, update and delete its properties without entering Visual Studio 
    public ChangePassword ChangePassword 
    { 
        get 
        { 
            //Get the instance of the change password control in the .ascx file 
            return this.ChangePassword1; 
        } 
        set 
        { 
            //Update properties, based on values from the change password control in the .ascx file 
            this.ChangePassword1 = value; 
        } 
    } 
 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
 
  Once you make the user control, you can upload it to Sitefinity.
progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments
Comments are disabled in preview mode.
Topics
 
 
Latest Stories in
Your Inbox
Subscribe
More From Progress
New_Mobile_Dev_Ebook_Progress_Website_Thumbail
The New Mobile Development Landscape
Download Whitepaper
 
IDC Spotlight Sitefinity Thumbnail
Choosing the Right Digital Experience Platform to Improve Business Outcomes
Download Whitepaper
 
TheFastestWayToBuildMobileAppsArtboard-2
The Fastest Way to Build Mobile Apps With Cloud Data
Watch Webinar