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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Can someone help me fix the Skin object Page Title?Can someone help me fix the Skin object Page Title?
Previous
 
Next
New Post
6/15/2006 8:09 PM
 

I don't recall where I got this from but I would like to update it to run on the 4.03 Version of DNN.  The comiled DLL i had worked on the 4.0.3 version but I was experiencing slow performance on that system.  Thinking that it could be due to framework type mismatches (ie, the page title being compiled for .net 1.1) i decided to try and update it.

I've got the source setup and can compile the website in VS 2005 so then I decided to try and integrate the old vb scripts.  That didn't work too well since it was written in VS 2003.  I then decided to create a new C# usercontrol and then I updated the references to mirror the privacy.ascx modules.

Now everything compiles but I think i'm missing something.  Perhaps someone more elightened with asp.net 2.0 and dnn 4.x can help me out here. 

My initial guess is that I don't know what i'm doing when it comes to the new C# 2.0 model. These partial classes don't make sense to me yet however The control does compile and does load on my page.  It just doesn't pull in the name of the page.

pagetitle.ascx.cs contents

using System;
using System.Web;
using DotNetNuke;
namespace DotNetNuke.UI.Skins.Controls
{
    public partial class PageTitle : DotNetNuke.UI.Skins.SkinObjectBase
    {
        private string _cssClass;
        const string MyFileName = "PageTitle.ascx";

        public string CssClass
        {
            get { return _cssClass; }
            set { _cssClass = value; }
        }
#region " Web Form Designer Generated Code "

        [System.Diagnostics.DebuggerStepThrough()]
        private void InitializeComponent()
        {}
        private void Page_Init(object sender, EventArgs e)
        {      
            InitializeComponent();
        }
#endregion
        /*        */
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!(Page.IsPostBack))
                {
                    if (CssClass != "")
                    {
                        lblPageTitle.CssClass = CssClass;
                    }
                }
                lblPageTitle.Text = PortalSettings.ActiveTab.TabName.ToString();
            }
            catch (Exception exc)
            {
                DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, exc);
            }
        }
    }
}

PageTitle.ascx contents

<%@ Control Language="C#" AutoEventWireup="false" CodeFile="pagetitle.ascx.cs" Inherits="DotNetNuke.UI.Skins.Controls.PageTitle" %>

<asp:Label id="lblPageTitle" runat="server" CssClass="PageTitle"></asp:Label>

 
New Post
6/15/2006 10:46 PM
 

The PageTitle skin object came packaged with DNN versions 2.x and 3.x as an example of making a skin oject, but was dropped in version 4.x.  I don't know why, and I've asked on these forums but got no response.  This came in real handy, and being part of the core (even though not activated by default) meant everyone had access to it.

I'd like the core team to re-institute this skin object.

 
New Post
6/19/2006 2:33 PM
 
I agree that it would be nice, but I'm curious why the values are not being bound to my asp label.  Any suggestions on what I can do to fix it?
 
New Post
6/19/2006 2:44 PM
 

I finally decided to try it in vb and the results were a success.  I guess i'll have to learn more abotu C# 2.0 before I begin developing modules on 4.03.  Anyways, in case your interested here is a link to download the control.  I just put it in my admin --> skins directory and then called it appropriatly on my skin.

http://beta.wsysa.com/Portals/0/PageTitle.ascx.zip

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Can someone help me fix the Skin object Page Title?Can someone help me fix the Skin object Page Title?


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