How to disable default skin for a particular contr

2019-05-18 19:46发布

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条回答
唯我独甜
2楼-- · 2019-05-18 19:53

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

查看更多
登录 后发表回答