I'm using a textarea control to allow the user to input text and then place that text into the body of an e-mail. In the code behind, what is the syntax for referencing the users input? I thought I could just use message.Body = test123.Text;
but this is not recognized.
HTML:
<textarea id="TextArea1" cols="20" rows="2" ></textarea>
CodeBehind:
foreach (string recipient in recipients)
{
var message = new System.Net.Mail.MailMessage("[email protected]", recipient);
message.Subject = "Hello World!";
message.Body = test123.Text;
client.Send(message);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…