I have a cleEditor on my page which needs rows=”” cols=”” and asp.net does not like this when I do runat=”Server”
To get around this I was trying to use FindControl, but I cannot seem to grab the value this way.
Here is my code:
protected void os_submit_Click ( object sender, EventArgs e )
{
Control cleEditor = FindControl( "editor2" );
MailMessage mm = new MailMessage( "OnlineSignup@help.com", "help@help.com" );
mm.Subject = "Online Signup Checklist";
mm.Body = cleEditor.value; // Trying to grab the value of the textarea
mm.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "127.0.0.1";
smtp.Port = 25;
smtp.Send( mm );
}
I have a TextArea that has the id of editor2. Behind the scense jquery turns this into a rich text editor. I need asp.net to be able to grab the value/text of this textarea.
Can anyone see what I am doing wrong?
Don’t put
runat="server"on the TextArea and do this: