It has come to my attention that when trying to add the 'style' attribute to an asp:TextBox control, or when trying to use a css class to apply a style, it does not seem to work. I find that I have to explicitly set the attribute like this:
<asp:TextBox runat="server" ID="DescriptionTextBox" BackColor="#F7FCFF" /> // This works
<asp:TextBox runat="server" ID="DescriptionTextBox" CssClass="textbox" /> // This doesn't work
<style type="text/css">
.textbox
{
background-color: #F7FCFF;
}
</style>
Although this may be a straightforward question, I would appreciate it if someone could provide some clarity on this matter for me.
Thank you