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, ...Having codebehind page on skinHaving codebehind page on skin
Previous
 
Next
New Post
2/12/2007 9:52 AM
 

Hi there,

 

I like to have a Code Behind page on my Skin so I try to have below codes but I got error I know that I have to inherit from 

DotNetNuke.UI.Skins.Skin and my CodeBehind page shuld be

~/admin/Skins/skin.vb

 

so I try to modify decoration skin page from <%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>

to

<%

Then on the CodeBehind page I try to use

 

Imports

 

 

 

 

 

 

 

End

End SubEnd Class Namespace
Public Class SkinInherits DotNetNuke.UI.Skins.SkinPrivate Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load'Implementation

When I run the DNN I got the error 

An error has occurred.

Any Help?

Thanks in advance


DotNetNukeNamespace MyCompany.UI.Skins
@ Control language="vb" CodeBehind="Horizontal Menu - Fixed Width.ascx.vb" AutoEventWireup="false" Inherits="MyCompany.UI.Skins.Skin" Explicit="True"%>
 
New Post
2/12/2007 11:00 AM
 
Ummm I'm not sure what you're asking. Edit your post and reorganize it a bit. Also, why all the wierd coloring?

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
2/12/2007 11:22 AM
 
Umm ... I really don't know what happened to my message! It wasn't like this when I submitted. By the way, the whole story is I like to have code behind page in my skin ascx, so I changed directive page from what it is

Control language="vb" Inherits="DotNetNuke.UI.Skins.Skin" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True"

to

Control language="vb" Inherits="MyCompany.UI.Skins.Skin" CodeBehind="Horizontal Menu - Fixed Width.ascx.vb" AutoEventWireup="false" Explicit="True"

but I got error. the reason that I want to have code behind page I like to have page load event to customize behavior of the skit during loading time. Finally I figured it out if I use CodeFile instead of CodeBehind page term my skin gets work fine.

so I rewrite my direction part to

Control language="vb" Inherits="MyCompany.UI.Skins.Skin" CodeFile="Horizontal Menu - Fixed Width.ascx.vb" AutoEventWireup="false" Explicit="True"

My error get away but I don't know why it works with CodeFile but not with CodeBehind....

Thanks

 
New Post
2/13/2007 9:52 PM
 
Does you code behind have the same namespace?
In your project properties, is there a default namespace messing it up?
Does your code behind inherit from DotNetNuke.UI.Sins.Skin?
 
New Post
2/13/2007 10:39 PM
 

Hi Edd,

This is what you can find in the code behind page for my new skin.

Imports

DotNetNuke

Namespace

 

 

 

If

 

imagetest.ImageUrl =

 

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init (Session("p") <> String.Empty) ThenDim imagetest As System.Web.UI.WebControls.Image = CType(Me.FindControl("imagetest"), System.Web.UI.WebControls.Image)"~/Portals/_default/Skins/DNN-Blue/images/" + Session("p")End If

 

End Sub

 

End

I hope these codes get your answers.

Have a question, what I want to do is base on session value which is filled within one of the module I want to have different logo (image) at the top of the skip. my current issue is my session fills after my skin is loaded. do you know how can I force page to reloaded?

this is the code in my skin.acsx

 

 

Thanks in advance

If (Session("p") <>string.Empty )then %><asp:image runat="server" ID="imagetest" ></asp:image><% else %><dnn:LOGO runat="server" id="dnnLOGO" /><%end ifwhen I click on my button in my module I am going to fill in session with a value and I get postback. but as you can see at the top I fill imagetest.ImageUrl  in the code behind page session will fill after page_init so at the first I don't have any thing in my page but if I refresh the page or navigating to other pages, the image will be appear. Do you have any suggestion?
End Class Namespace
Public Class SkinInherits DotNetNuke.UI.Skins.Skin
CompanyName.UI.Skins
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Having codebehind page on skinHaving codebehind page on skin


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