Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# SteveLalor 7/10/2007 9:57 PM
Hi all,

I need to a basic user control which just outputs the current nodes title.

I think the user control is fine to be in the template as it will be on everypage.

Has anyone already developed something like this?

Steve
# Efie 7/10/2007 10:07 PM
This should be not to hard to implement.

Just create a user-control with a label or something and in the page_load event you should do something like this:
private PageEngine _page

private void Page_Load(object sender, System.EventArgs e)
{ 
    if (this.Page is PageEngine)
    {
       this._page = (PageEngine)this.Page;	
       this.lblNodeTitle.Text = this._page.ActiveNode.Title;
    }
}

Didn't try this, but something like this should work.