.NET Framework Class Library
WebControlSkinID Property

Gets or sets the skin to apply to the control.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)
Syntax
<[%$TOPIC/b8w161y2_en-us_VS_110_1_0_0_0_0%](True)> _
Public Overrides Property SkinID As [%$TOPIC/b8w161y2_en-us_VS_110_1_0_0_0_1%]
[[%$TOPIC/b8w161y2_en-us_VS_110_1_0_1_0_0%](true)]
public override [%$TOPIC/b8w161y2_en-us_VS_110_1_0_1_0_1%] SkinID { get; set; }
[[%$TOPIC/b8w161y2_en-us_VS_110_1_0_2_0_0%](true)]
public:
virtual property [%$TOPIC/b8w161y2_en-us_VS_110_1_0_2_0_1%]^ SkinID {
	[%$TOPIC/b8w161y2_en-us_VS_110_1_0_2_0_2%]^ get () override;
	void set ([%$TOPIC/b8w161y2_en-us_VS_110_1_0_2_0_3%]^ value) override;
}
[<[%$TOPIC/b8w161y2_en-us_VS_110_1_0_3_0_0%](true)>]
abstract SkinID : [%$TOPIC/b8w161y2_en-us_VS_110_1_0_3_0_1%] with get, set
[<[%$TOPIC/b8w161y2_en-us_VS_110_1_0_3_0_2%](true)>]
override SkinID : [%$TOPIC/b8w161y2_en-us_VS_110_1_0_3_0_3%] with get, set
<asp:[%$TOPIC/b8w161y2_en-us_VS_110_1_0_4_0_0%] SkinID="[%$TOPIC/b8w161y2_en-us_VS_110_1_0_4_0_1%]" />

Property Value

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

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

Remarks

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.

Version Information

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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