如何禁用特定控件的默认外观? [英] How to disable default skin for a particular control?

查看:77
本文介绍了如何禁用特定控件的默认外观?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能没有使用.skin文件中指定的默认外观的控件?

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.

推荐答案

在大多数asp.net书籍中找到此解决方案:使用EnableTheming

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

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

但是,它根本不起作用:D.有人说这是一个错误,并提出了一种解决方法:将SkinID设置为不存在"的ID

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

这篇关于如何禁用特定控件的默认外观?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆