all groups > asp.net building controls > february 2006 >
You're in the

asp.net building controls

group:

How can I prevent SmartTag from showing?


How can I prevent SmartTag from showing? amanda
2/23/2006 6:35:04 PM
asp.net building controls: Hi,

I've a webcontrol which inherited from BaseValidator.
Under the .Net 2.0, such control has a default function----SmartTag,
which is new in 2.0.
But I do not need it.
How can I do ?
My ValidatorDesigner is inherited from ControlDesinger.

/// <summary>
/// Summary description for ValidatorDesigner.
/// </summary>
internal class ValidatorDesigner:ControlDesigner
{
...
}

I have returned a null to ActionList, but the smart Tag still can be
seen.

/// <summary>
/// Gets the items that will populate smart tag menu.
/// </summary>
protected virtual BaseActionList ActionList
{
get
{
return null;
}
}

Thanks for your answer.
Re: How can I prevent SmartTag from showing? amanda
2/23/2006 7:01:10 PM
Have resolved.
See codes below.

/// <summary>
/// Override the ActionLists to use pull model to populate
smart tag menu.
/// </summary>
public override DesignerActionListCollection ActionLists
{
get
{
DesignerActionListCollection actionLists = new
DesignerActionListCollection();
actionLists.Add(new
DesignerActionList(this.Component));

return actionLists;
}
}
AddThis Social Bookmark Button