When I first used the login controls for Sitefinity, I was very surprised that a Password Recovery control was not included. This can be easily implemented into the CMS by following these instructions:
- Create a new user control and drop a Password Recovery control onto the page. Make sure it is ID property is set to "passwordrecovery1"
- Press F7 and add this code after the Page_Load method:
public PasswordRecovery PasswordRecovery
{
get
{
return this.PasswordRecovery1;
}
set
{
this.PasswordRecovery1 = value;
}
}
This code will create a new instance of Password Recovery and using the get/set accessors, make all the properties from Visual Studio accessible through Sitefinity. Even if this were dropped in a master page in a non-Sitefinity project, you would still see the public properties. When user controls are dropped onto content pages, you cannot edit them directly on the content page unless public properties are exposed. You can also follow this pattern for other controls, such as the Change Password control, if you want to use them in Sitefinity and gain access to those properties.
After following these steps, upload the control to Sitefinity. When you click on the edit button, you will notice a edit button on the next screen below the ID property. Click on it and you will see all the properties out of Visual Studio. For a code example, please view my
downloads page.