PasswordRecovery .NET
by admin on jan.16, 2009, under Developing
I’m using the PasswordRecovery control and find it both good and bad. The good part is that its rather simple. It does what it’s supposed to do and its painless to use. If you you’re not bothered with the looks then its really really good since all you need is basicly one row of code. I’ll just post a quickie on how to use the passwordrecovery control in a more friendly way. Nothing new and nothing revolutionary and if you have any ideas or comments to add, I’ll appreciate it and add it to the post.
It’s a simple ”type your e-mail and you’ll get a new password” feature. Without a question to answer and that’s because its based on episerver thinking and your e-mail is more than enough. Anyway, here it comes.
For the Front:
[sourcecode language=’html’]
[/sourcecode]
And thats it. For some reason, everything is centered so I just put in a few left align to make it look better.
For the backend:
[sourcecode language=’csharp’]
protected override void OnLoad(EventArgs e)
{
CreateMail();
base.OnLoad(e);
}
private void CreateMail()
{
ctrlPasswordRecovery.MailDefinition.From = ”email”; //Fetch from db, xml or property
ctrlPasswordRecovery.MailDefinition.Subject = ”Subject”; //Fetch from db, xml or property
ctrlPasswordRecovery.SuccessText = ”Succeded”; //Fetch from db, xml or property
ctrlPasswordRecovery.MailDefinition.BodyFileName = ”RecoverPassword.txt”;
}
[/sourcecode]
And thats it.
The one thing that is really really bad about the passwordrecovery is that you can’t modify the body without using a txt file. i.e you can’t just make a method to generate the mailbody. You can indeed override the sending method and make your own mailbody, BUT, you can’t send the username and password in a format you wish. e.g if you speak another language than english and would like to send the email in say, spanish. I’ve searched around quite a lot but all I’ve found is the same ”make a txt file”. If someone knows how to send the password and username, please let me know.
Otherwise in a txt file you just use <%UserName%> and <%Password%> and in that way you can modify your txtfile however you want.
1 Comment for this entry
3 Trackbacks / Pingbacks for this entry
-
Customizing the PasswordRecovery Control .Net | Rizo's
februari 19th, 2009 on 11:17[…] you need. But it’s rather easy to customize the way you want it too. I posted earlier how you could set a PasswordRecovery up and here we’ll look how we can customize it a bit further […]
-
เว็บตรงสล็อตฝากถอน ไม่มีขั้นต่ำ 1 บาท ก็ถอนได้วอเลท
september 29th, 2023 on 23:17… [Trackback]
[…] Read More here to that Topic: from-rizo.se/passwordrecovery-net/ […]
-
สล็อตเว็บนอก
november 21st, 2023 on 06:00… [Trackback]
[…] Find More Info here to that Topic: from-rizo.se/passwordrecovery-net/ […]
januari 16th, 2009 on 21:05
Gu vad duktig du är! Rena jibrish för mig ;o)