To set the CSS class of an
HtmlTextArea
control, or anything else defined in the
System.Web.UI.HtmlControls
namespace, you'll have to use
the Attributes
collection[
^]:
txtarAccountCodes.Attributes["class"] = "clearonreset";
Alternatively, you could use the
TextBox
control with the
TextMode
set to
MultiLine
:
txtarAccountCodes = new TextBox
{
TextMode = TextBoxMode.MultiLine,
CssClass = "clearonreset"
};