具有本地化内容的ASP.NET PasswordRecovery控件 [英] ASP.NET PasswordRecovery Control with Localized content

查看:81
本文介绍了具有本地化内容的ASP.NET PasswordRecovery控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET成员身份和登录控件来开发一个简单的门户应用程序.我想使用PasswordRecovery控件发送包含忘记密码的电子邮件,但是我的门户网站需要本地化.我有一个现有的内容管理系统,正在从中提取本地化的字符串,我想将PasswordRecovery控件链接到该系统.

I am working on a simple portal application using the ASP.NET membership and login controls. I would like to use the PasswordRecovery control to send emails containing forgotten passwords, however my portal requires localization. I have an existing Content Management System that I am pulling the localized strings out of and I would like to link the PasswordRecovery control to that system.

但是,似乎PasswordRecovery控件将仅接受电子邮件正文的.txt文件...属性为PasswordRecovery1.MailDefinition.BodyFileName

But, it appears that the PasswordRecovery control will ONLY accept a .txt file for the email body...the property is PasswordRecovery1.MailDefinition.BodyFileName

我不想使用磁盘上的文件,我想在CMS中使用本地化的内容.

I do not want to use a file on disk, I would like to use the localized content in my CMS.

有没有办法做到这一点?我想到我可以使用SendingMail事件通过普通的System.Net命名空间发送我的OWN电子邮件,但这似乎有点笨拙……

Is there any way to do this? It occurred to me that I might be able to use the SendingMail event to send my OWN email through the normal System.Net namespace, but that seems sorta cludgy...

有什么想法吗?

谢谢, 最高

推荐答案

尝试处理PasswordRecovery控件的SendingMail事件.在这种情况下,请将e.Message.Body和e.Message.Subject属性设置为本地化的文本.

Try handling the SendingMail event of the PasswordRecovery control. In that event, set the e.Message.Body and e.Message.Subject properties to your localized text.

这篇关于具有本地化内容的ASP.NET PasswordRecovery控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆