I created some free ASP.NET controls you may find useful.
http://brennan.offwhite.net/blog/200...es-management/
They are simply User Controls which use the Membership Provider. These
controls do not have a button to reset the password for a user, but you
can do that with this code.
Private Sub ResetPassword(ByVal username As String)
Dim user As MembershipUser = Membership.GetUser(username)
Dim oldPassword As String = user.GetPassword()
Dim newPassword As String = Membership.GeneratePassword(8, 2)
user.ChangePassword(oldPassword, newPassword)
' send new password to user.Email
End Sub
It generates a new password for the user. Once done, you can send that
user an email with the new password.
Brennan Stehling
http://brennan.offwhite.net/blog/
Ofer wrote:
> Hi,
>
> We use the ASP.net loginControls and the DB schema.
> How to programmatically activate the "PasswordRecovery" of a specific
> end-user when a user clicks my web application's button?
> I need to send a specific user an email with a new "reset" password.
>
> I thought of including an invisible PasswordRecovery Control and initialize
> the "User Name" field.
> PasswordRecovery1.UserName = "zako";
> PasswordRecovery1.Visible = false;
> But how to simulate a "click" of the PasswordRecovery control's "Submit"
> button?
>
> Thanks!