Welcome to Rainbow Portal Community Sign in | Join | Help

Sharing Master Pages and Themes across applications

Themes:

Using Global Theme is way to share Theme between different Apps.eg if you want to create a Global Theme called theme1

  • For Cassini server create a Theme1 folder inside framework folder like \WINDOWS\Microsoft.NET\Framework\v2.0.xxxxx\
        • ASP.NETClientFiles\Themes\ThemeName
  • For IIS server create a Theme1 folder inside like  \Inetpub\wwwroot\aspnet_client\system_web\
        • v2.0.xxxxx\Themes\ThemeName

Application level Themes will override Global themes. so if Theme named ThemeName is defined at Global and Application level then application level Blue theme will be applied to the site.

Master Pages:

* Image and Content based on David Christiansen's Weblog

The process:

  1. Create an empty Website in VS.NET 2005 (delete anything in it including App_Data and Default.aspx).

  2. Add a master page into the Website. 

  3. Select Build | Publish Website from the VS.NET menu.

  4. On the screen that follows select a target site, and check all of the checkboxes except for the top one that allows for dynamic updates. ( Note you need to supply your own sink file. You can do so with the Strong Name Tool

  5. Something like this:

  6. After the publish operation completes, You should see a new assembly (with a somewhat strange name) in the Bin folder.  This assembly is your master page in compiled form.

  7. Install the assembly into the GAC using gacutil.exe or drag-and-drop it into c:\Windows\Assembly

  8. Add a web.config file into your project and add the following within the <system.web> begin and end tags, You'll need to change the name of the assembly to the name that is generated for your project (the one you added into the GAC) and change the PublicKeyToken to the one you see in the GAC. 

       1:  <compilation debug="true">
       2:  <assemblies>
       3:  <add assembly"App_Web_masterpagebase.master.cdcab7d2, Version=0.0.0.0, 
       4:     Culture=neutral,PublicKeyToken=cceb8435cfc68486" /> // THIS MUST BE ONE LINE
       5:  </assemblies>
       6:  </compilation>
  9. Add a master page into the Website but don't create a code-behind page for it, instead change the header of the master to read like this
  10.    1:  <%@ Master Language="C#" Inherits="ASP.masterpagebase_master" %>
  11. and delete all the rest of the content from the master page.
  12. You can use the object browser to see the name of your class that is within the .dll generated it should be within an ASP namespace.
Published mercoledì 15 febbraio 2006 17.52 by Jonathan
Filed under: ,

Comments

# re: Sharing Master Pages and Themes across applications

martedì 16 gennaio 2007 15.19 by may215

hi...

i followed the link and did the first section, and publish my webSite who contain the masterPage that i want to share between the applications:

and i get the following DLL's(i need all the files in the webSite who contain the masterPage that i want to share)

App_Code.dll

App_global.asax.dll

App_LocalResources.root.dll

App_Theme_MekorotTheme.dll

App_Web_default.aspx.cdcab7d2.dll

App_Web_mekorot-main.master.cdcab7d2.dll

App_Web_xmlhttpmanage.aspx.cdcab7d2.dll

So, my questions are, do i need to drag-and-drop all this dll's to GAC?

if so, in the project that i want to use the masterPage, i have to add those assemblies to web.config?

and, after that, in the project that i want to use this masterPage, i have to add masterPage, without any content or code behind, that inherit from the masterPage that i add to the GAC(<%@ Master Language="C#" Inherits="ASP.App_Web_mekorot-main.master" >)

??

thank you....

# best loan payday best payday loan

venerdì 1 febbraio 2008 19.22 by cash advance service

All the cash advance service no fax required payday loan

# advance cash day loan pay

venerdì 1 febbraio 2008 20.42 by advance cash day pay cash advance until pay day

In this case cash loan payday till loan until payday

# sony music box ringtones

lunedì 4 febbraio 2008 19.30 by free make own ringtones

Nowadays metro pcs phone ringtones cell mobile phone ringtones virgin

# advance? cash loan online payday ?

lunedì 4 febbraio 2008 20.54 by tlcharger jeux poker gratuits

If she ringtones for prepaid cell phone approval instant loan payday

# 30 day payday loan

lunedì 4 febbraio 2008 21.49 by payday loan paycheck advance

Applying for 100 loan online payday get it now ringtones verizon

# cingular free phone ringtones

As mentioned advance cash loan payday software? ? cingular free phone ringtones

# use the dlls generated after publish website

sabato 7 giugno 2008 7.12 by use the dlls generated after publish website
Anonymous comments are disabled