In my ASP .NET Web Forms I have the following declarative code:
\' />
This will work.
Mark up
Code-behind
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtbox.DataBind(); } }
But its a lot cleaner to access the CssClass property of the asp:TextBox on Page_Load
CssClass
asp:TextBox
Page_Load