具有本地化内容的 ASP.NET 密码恢复控件
我正在使用 ASP.NET 成员资格和登录控件开发一个简单的门户应用程序。我想使用 PasswordRecovery 控件发送包含忘记密码的电子邮件,但我的门户需要本地化。我有一个现有的内容管理系统,我正在从中提取本地化字符串,并且我想将PasswordRecovery 控件链接到该系统。
但是,PasswordRecovery 控件似乎只接受电子邮件正文的 .txt 文件...属性是 PasswordRecovery1.MailDefinition.BodyFileName
我不想使用磁盘上的文件,我想使用本地化内容我的内容管理系统。
有什么办法可以做到这一点吗?我突然想到,我也许可以使用 SendingMail 事件通过正常的 System.Net 命名空间发送我自己的电子邮件,但这似乎有点笨拙......
有什么想法吗?
谢谢, 最大限度
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.
But, it appears that the PasswordRecovery control will ONLY accept a .txt file for the email body...the property is PasswordRecovery1.MailDefinition.BodyFileName
I do not want to use a file on disk, I would like to use the localized content in my CMS.
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...
Any thoughts?
Thanks,
Max
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试处理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.
通过谷歌搜索“BodyFileName 本地化”找到了这个:
http://forums.asp.net/t/1118242 .aspx:
Found this by googling "BodyFileName localization":
http://forums.asp.net/t/1118242.aspx: