Microsoft Content Management Server - Using the PlaceholderNameEditor in ASP.NET 2.0 UserControls

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > March 2006 > Using the PlaceholderNameEditor in ASP.NET 2.0 UserControls





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using the PlaceholderNameEditor in ASP.NET 2.0 UserControls
David @ WSDOT

2006-03-21, 8:47 pm

Hi,

I am using ASP.NET 2.0 with CMS 2002 SP2. I have a UserControl that
contains two PlaceHolderControl. I have a properties of the UserControl to
set the PlaceHolderControls' PlaceHolderToBind property:

public string HtmlPlaceholderToBind
{
get { return HtmlControl.PlaceholderToBind; }
set { HtmlControl.PlaceholderToBind = value; }
}
public string ImagePlaceholderToBind
{
get { return ImageControl.PlaceholderToBind; }
set { ImageControl.PlaceholderToBind = value; }
}

This works very well.

What I'd like to do is use the PlaceholderNameEditor
(Microsoft.ContentManagement.WebControls.Design) so the property will
function just like it were a property of a PlaceholderControl. Like so:

using System.Drawing.Design;
using Microsoft.ContentManagement.WebControls.Design;

& #91;EditorAttribute(typeof(PlaceholderNa
meEditor), typeof(UITypeEditor))]
public string ImagePlaceholderToBind
{
get { return ImageControl.PlaceholderToBind; }
set { ImageControl.PlaceholderToBind = value; }
}

The Designer (Visual Studio) doesn't seem to recognize this and treats the
property like it was simply a text property. Am I missing something? How
should this be implamented?

David

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com