<asp:PasswordRecovery ID="PasswordRecovery1" runat="server">
<MailDefinition BodyFileName="myMail.txt"/>
</asp:PasswordRecovery>
其中,在MYMAIL.TXT中,可以这样定义,
你的用户名是: <% UserName %>
你的密码是: <% Password %>
此外,还可以在onsendmail事件中定义更复杂的,如下
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server" OnSendingMail="PasswordRecovery1_SendingMail">
protected void PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
//Get the username and password for the user here
e.Message.Body = "The accont information message ....";
}
本文地址:http://com.8s8s.com/it/it8102.htm