>> it says that there are no useable controls for a txt file
Where does it say that? You should be able to modify the text file without getting errors like this. Here's a quick example (place this code in ContactForm.txt in the App_Data folder):
Code:
Hi there,<br /><br />
A user has left the following feedback at the site:<br /><br />
<table class="auto-style1">
<tr>
<td>
Name:
</td>
<td>
##Name##</td>
</tr>
<tr>
<td>
E-mail address: </td>
<td>
##Email##</td>
</tr>
<tr>
<td>
Home phone: </td>
<td>
##HomePhone##</td>
</tr>
<tr>
<td>
Business phone: </td>
<td>
##BusinessPhone##</td>
</tr>
<tr>
<td>
Comments: </td>
<td>
##Comments##</td>
</tr>
</table>
Then when sending the e-mail, set IsBodyHtml to true like this (in ContactForm.ascx.cs):
Code:
myMessage.Subject = "Response from web site";
myMessage.Body = mailBody;
myMessage.From = new MailAddress(AppConfiguration.FromAddress, AppConfiguration.FromName);
myMessage.To.Add(new MailAddress(AppConfiguration.ToAddress, AppConfiguration.ToName));
myMessage.IsBodyHtml = true;
SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.Send(myMessage);
Hope this helps,
Imar