The HtmlControlDesigner.OnBehaviorAttached method is obsolete. Use the IControlDesignerTag.SetAttribute(string, string) and IControlDesignerTag.GetAttribute(string) methods on the ControlDesigner.Tag property to map properties to styles. Use the ContainerControlDesigner.GetDesignTimeCssAttributes method on the System.Web.UI.Design.ContainerControlDesigner class to set styles for the control at design time. Override the HtmlControlDesigner.Initialize(System.ComponentModel.IComponent) method to manipulate the initial styles for the control at design time.