How to disable default skin for a particular contr

2019-05-18 20:06发布

问题:

Is it possible to have a control which does not use the default skin that is specified in a .skin file?

I have a control for which I do not want a default skin applied to.

回答1:

Find this solution in most asp.net books: use EnableTheming

<asp:Button ID="Button1" runat="server" Text="Button" EnableTheming="false" />

However, it just doesn't work :D. Someone said it's a bug and suggest a workaround: set SkinID to a "not exist" ID

<asp:Button ID="Button1" runat="server" Text="Button" SkinID="0" />

This works for me but... have a bad feeling