How to disable default skin for a particular control?

人走茶凉 提交于 2019-12-22 13:59:34

问题


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



来源:https://stackoverflow.com/questions/3783310/how-to-disable-default-skin-for-a-particular-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!