BTW, I implemented the TypeConverter below and it works like a champ.
Thanks,
Bill
>Hi Bill,
>
>you can't assign a control to an attribute in ASP.NET. All you can do (and what ASP.NET does for many of its controls) is assigning the ID for the desired control. This would need to be a string property. In order to be able to select a MultiView in the properties window even for a String property, you need to implement a TypeConverter:
>
> public class myButton : System.Web.UI.WebControls.Button
> {
> [TypeConverter(typeof(MultiViewConverter))]
> public String MyView { get; set; }
> }
>
> public class MultiViewConverter : AssociatedControlConverter
> {
> protected override bool FilterControl(Control control)
> {
> return (control.GetType() == typeof(MultiView));
> }
> }
>
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.