Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...How to include common.ascx in myskin[a-z].ascx?How to include common.ascx in myskin[a-z].ascx?
Previous
 
Next
New Post
5/13/2010 9:17 PM
 
I have completed some skinning for DNN 5.x and have been editing the ascx's directly.  The include shown below works fine for DNN alone but now I want to develop a module using C# and VS2008.  I was following http://www.codeproject.com/KB/aspnet/DNNLINQtoSQL.aspx.

Now I try to build the entire DNN installation for this development preparation.  The build in VS2008 fails because I am using the following method to include common header and footer content in myskina.ascx:

< %@ Control Language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" % >
< %@ Register TagPrefix="dnn" TagName="LOGIN" Src="~/Admin/Skins/Login.ascx" % >
< %@ Register TagPrefix="dnn" TagName="NAV" Src="~/Admin/Skins/Nav.ascx" % >
< %@ Register TagPrefix="dnn" TagName="STYLES" Src="~/Admin/Skins/Styles.ascx"  %>
...
< ! -- end #contentholder -- >
< ! --#include file="common.ascx"-- >

What is the proper way to combine ascx files to comprise a complete skin? 

The build errors I find are when the build attempts to compile the specific client skins folders I have added into my development DNN.

Using the example above, when the build reaches common.ascx it claims: Unknown server tag 'dnn:NAV'.

However, if I put the <%@Register %> directive in the common.ascx, then I receive the error that a control cannot be registered twice.

Next I tried removing all directives from the top of the myskins[a-z].ascx that include common.ascx and inserting them at the top of common.ascx. In the myskin[a-z].ascx files, I put a <%@Reference %> directive into common.ascx. Now the error is back to Unknown server tag 'dnn:nav', presumeably because the tag in myskina.ascx appears before it is registered in common.ascx (which is included at the bottom for SEO purposes).

Regards,
G..L
 
New Post
5/15/2010 3:02 AM
 
It had to be something semi-obvious and it was.

<%@ Register TagPrefix="common" TagName="a" src="common.ascx" %>

goes in at the top of myskin.ascx and then the tag common:a can be runat="server" at the bottom of myskin.ascx.

Inside common.ascx all the standard Register directives are there for common content.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...How to include common.ascx in myskin[a-z].ascx?How to include common.ascx in myskin[a-z].ascx?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out