textarea控件,asp.net c#
我正在使用textarea控件允许用户输入文本,然后将该文本放入电子邮件正文中。在后面的代码中,引用用户输入的语法是什么。我以为我可以使用“message.Body = test123.Text;”但这是不被承认的。
aspx页面中的代码---
<textarea id="TextArea1" cols="20" rows="2" ></textarea>
代码背后---
foreach (string recipient in recipients)
{
var message = new System.Net.Mail.MailMessage("sender@example.com", recipient);
message.Subject = "Hello World!";
message.Body = test123.Text;
client.Send(message);
}
没有找到相关结果
已邀请:
5 个回复
亨尖玛次酥
添加到HTML TextArea控件或使用.NET控件: 试试这个:
然后在你的codebehind中引用它:
烫珊
:
您可以将runat = server属性与任何标准HTML元素一起使用,然后在代码隐藏中使用它。
伞腹
标签中有
属性
然后您可以通过以下方式访问内容:
藕挝
抚驰
属性包含在
中
什么是
?