In the ASP. NET 2.0 login control (for details, see my Article , Recovery), in which passwordrecovery (restoring the user password control, when the user enters the password to answer the question, after the answer, the user's user name and password are emailed to the user, where we
It can improve the prompt password information)
<Asp: passwordrecovery id = "passwordrecovery1" runat = "server">
<Maildefinition bodyfilename = "mymail.txt"/>
</ASP: passwordrecovery>
In mymail. txt, you can define it as follows,
<! ----> <O: P> </O: P>
Your username is:<% Username %>
Your password is:<% Password %>
In addition, you can define more complex in the onsendmail event, as shown below:
<Asp: passwordrecovery id = "passwordrecovery1" runat = "server" onsendingmail = "passwordrecovery#sendingmail">
<O: P> </O: P>
<O: P> </O: P>
Protected void passwordrecovery1_sendingmail (Object sender, mailmessageeventargs E)
{
// Get the username and password for the user here
E. Message. Body = "The accont information message ....";
}