Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
WebControl Class
 SkinID Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
WebControl..::.SkinID Property

Gets or sets the skin to apply to the control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
Visual Basic (Declaration)
<BrowsableAttribute(True)> _
Public Overrides Property SkinID As String
Visual Basic (Usage)
Dim instance As WebControl
Dim value As String

value = instance.SkinID

instance.SkinID = value
C#
[BrowsableAttribute(true)]
public override string SkinID { get; set; }
Visual C++
[BrowsableAttribute(true)]
public:
virtual property String^ SkinID {
    String^ get () override;
    void set (String^ value) override;
}
JScript
public override function get SkinID () : String
public override function set SkinID (value : String)
ASP.NET
<asp:WebControl SkinID="String" />

Property Value

Type: System..::.String
The name of the skin to apply to the control. The default is Empty.
ExceptionCondition
ArgumentException

The skin specified in the SkinID property does not exist in the theme.

Skins available to a control are contained in one or more skin files in a theme directory. The SkinID property specifies which of these skins to apply to the control. A skin is specific to a particular control; you cannot share skin setting between controls of different types.

If you do not set the SkinID property, a control uses the default skin if one is defined. For example, if a skin without an ID is defined for an Image control, then that skin applies to all Image controls that do not explicitly reference a skin by ID and that are not set to disable theming. If a skin with an ID is defined for an Image control, then that skin applies to only Image controls whose SkinID is set to that ID.

If the skin files in a theme directory do not contain a skin with the specified SkinID, an ArgumentException exception is thrown at runtime.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker