Pages

Men

rh

7/10/2012

What are the types of control skins in ASP.NET and what is the difference between Named skins and Default skins?

What are the types of control skins in ASP.NET and what is the difference between Named skins and Default skins?

  1. Default skins
  2. Named skins

Difference :

A default skin automatically applies to all controls of the same type when a theme is applied to a page. 

A control skin is a default skin if it does not have a SkinID attribute. 

For example, if you create a default skin for a Calendar control, the control skin applies to all Calendar controls on pages that use the theme. (Default skins are matched exactly by control type, so that a Button control skin applies to all Button controls, but not to Link Button controls or to controls that derive from the Button object.) 

A named skin is a control skin with a SkinID property set. 

Named skins do not automatically apply to controls by type. Instead, you explicitly apply a named skin to a control by setting the control's SkinID property. 

Creating named skins allows you to set different skins for different instances of the same control in an application

No comments :

Post a Comment