Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to share a .skin theme file between themes in ASP.NET?

Tags:

asp.net

themes

We have a legacy app with multiple asp.net themes. Each theme have a .skin file. Each skin file is almost identical except for some things. The files share a lot of similarities. Is it possible to share a common .skin file across themes?

like image 820
EtienneT Avatar asked Mar 15 '11 13:03

EtienneT


People also ask

What is a skin file?

Skin file used by ASP.NET applications; contains definitions of the visual styles of individual application controls, such as buttons, labels, text boxes, and calendars; can specify colors, fonts, layout styles, and other formatting options; used for changing the look and feel of the Web application.

What is theme explain global theme?

A Global theme is a theme that is applied to all the web sites on a web server and includes property settings, and graphics. This theme allows us to maintain all the websites on the same web server and define the same style for all the web pages of the web sites.

Which are skin templates used to define the look of Page and controls?

A "theme" is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in a Web application, across an entire Web application, or across all Web applications on a server.


2 Answers

It is possible by creating a base theme skin file somewhere and then using an include in the specific theme skin files.

For instance, you would define all your controls in baseTheme.skin and put it somewhere on your server. Then, in your specific theme file (theme.skin), you would do an include back to your base.

<!-- #include file="../themeBase.skin" -->
like image 95
Brad Avatar answered Oct 11 '22 14:10

Brad


Unfortunately it's not possible, skins are by design contained within a theme:

http://forums.asp.net/t/1268733.aspx/1

like image 28
Matt Avatar answered Oct 11 '22 14:10

Matt