Add a class along with the class specified in the skin

We use themes to style our control.

For the text box, we added this to the skin

<asp:TextBox runat="server" CssClass="txt edit_txt" />

Now, in some cases, we want to add another class along with these two classes.

when we added a text box like this in aspx

<asp:TextBox ID="txtnameE" runat="server" MaxLength="30" CssClass="RequiredCheckClass"></asp:TextBox>

When rendering, he did not take the RequiredCheckClass class, but only the other 2 classes indicated on the skin.

So, is there a way to add a class along with the classes specified in the skin from an aspx page.

PS: now I'm going to use the @Curt clause or will use EnableTheming = false and add all the necessary classes to this control. Please check if anyone has any other idea besides these ....

+3
source share
2 answers

TextBox Skin, :

<asp:TextBox SkinID="Required" runat="server" CssClass="txt edit_txt RequiredCheckClass" />

:

<asp:TextBox ID="txtnameE" runat="server" MaxLength="30" SkinID="Required"></asp:TextBox>

, . ASP.NET, , .

+2

"class" - , HTML. thats , .

<asp:TextBox SkinID="Required" runat="server" class="RequiredCheckClass" CssClass="txt edit_txt" />
0

All Articles