themes in asp.net:-
- themes are an extension of another idea, like the master page.
- themes are different from the master page.
- the master page enables the user to share content across multiple pages in 3 websites.
- a theme, on the other hand, enables you to control the appearance of the content.
- in a simple, it helps to provide additional features for the webpage.
- it can be implemented either particular page or for the master page, it can be implemented for the web.config file also.
- it can be implemented for all the pages inside the website.
- we can add multiple themes as per the project required.
—>> theme folder can contain a variety of different types of file which is given below:
- cascading style sheets(CSS)
- it generally contains visual properties for more or one kinds of asp.net controls.
- it also has an extension like .skin
- it contains property settings for individual controls such as buttons, label, textbox, etc
- for each control, you can define skins in a separate file or define all the skins for a theme in a single file.
—> two types of skins:
- default skin:-
- it applies automatically to all the controls of the same type when a theme is applied to a page.
- the skinid is not defined.
- per control type, only one default control skin is allowed in the same theme.
example:- <asp:Lable runat="server" Fore-Color="#585980" Font-Size="0.8em" Font-Names="Arial"/>
2. named skin:-
- skinid property set.
- named skin do not automatically apply to controls by type.
- it should be defined uniquely because duplicate skinid per skin per control type are not allowed in the same theme.
example:- <asp:GridView runat="server" skinId="gridviewskin" Backcolor="White"> <AlternatingRawStyle Backcolor="Blue"/> </asp:GridView>
2. cascading style sheet(CSS):-
- it may be added to a theme by placing it under the named theme subdirectory.
- when you put a .css file in the theme directory, the style sheet is applied automatically as part of the theme.
- this stylesheet will be applied to all pages with that theme applied.
- it also has extension like .css