Recent Posts
None | 1 sec ago
None | 14 sec ago
None | 23 sec ago
None | 34 sec ago
None | 35 sec ago
Java | 55 sec ago
XML | 56 sec ago
None | 1 min ago
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Domain Reports
Please check out our new and improved Firefox Add-on. hide message
By mdata on the 7th of Aug 2009 03:39:19 AM Download | Raw | Embed | Report
  1.  <%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
  2.  
  3.  <asp:placeholder id="SkinPlaceholder" runat="server">
  4.    <link rel="stylesheet" type="text/css" id="csslink" runat="server" />
  5.    <div id="ControlPanel" runat="server" />
  6.    <div id="ContentPane" runat="server" class="ContentPane Pane" />
  7.  </asp:placeholder>
  8.  
  9. <script runat="server">
  10.     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  11.     '**  Skincovered.com Portal Alias based skin switcher
  12.     '**  Switches the skin depending on the Url used to access the site
  13.     '**  Select this skin (topmenu_switch) as would any other skin in DotNetNuke
  14.     '** The code below will load a skin from the same folder depending on the Url
  15.         Dim skin As String = ""
  16.         Dim HostName As String = Request.ServerVariables("SERVER_NAME").ToLower()
  17.         Select HostName.Remove(HostName.IndexOf("."))
  18.             Case "foo":
  19.                 skin = "foo"
  20.             Case "bar":
  21.                 skin = "bar"
  22.             Case Else:
  23.             'this skin will be loaded if no matches were made to the portal aliases above
  24.                 skin = "default"
  25.         End Select
  26.  
  27.         'this line loads the actual skin.
  28.         Dim sc As Control = LoadControl(skin+".ascx")
  29.         SkinPlaceholder.Controls.Remove(ControlPanel)
  30.         SkinPlaceholder.Controls.Remove(ContentPane)
  31.         SkinPlaceholder.Controls.Add(sc)
  32.         csslink.Attributes.Add("href", SkinPath+skin+".css")
  33.     End Sub
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: