1
I have a web application with several Textboxes. However, I need some of them to stay with Multiline because of the text they will contain. Every time I make this change I lose CSS settings. From what I’ve researched it seems that Textbox becomes Textarea in Runtime.
So I needed to know how to maintain or even add CSS to that object in order to keep my back Colors, Fonts and Sizes.
Example of ASP:
<asp:TextBox ID="txtCC" runat="server" TextMode = "MultiLine" Width="100%" CssClass="textArea" ReadOnly="True"></asp:TextBox><br />
Example of CSS
.textArea
{
background-color:#EEEEEE;
font-family: Verdana;
font-size: 11px;
}
Can you give us the code you’ve already created for this?
– Marciano.Andrade
Edited to include code
– Filipe Vilhena
does one more thing? take a look at the html that is generated on the page with the multiline and without the multiline, theoretically if you set a class to the textbox it should use it...
– Marciano.Andrade
When he sees the generated code, he puts the textbox as textarea but ignores the CSS, hence my question....
– Filipe Vilhena