Hi. As my title says, I have a set property crash problem.

Here's the scnario:

1. I have created a simple custom ASP.Net server control that generates some text.
?2.? I wanted to give design-time property for that text so its style can be accessed by developers from the properties window.
?3. ?All the properties in the properties window are working except the ones with the type System.Web.UI.WebControls.Style that I have created.


Here is my property:

[Bindable(true)] [Category("Appearance")] [Description("The style for the header")] [Localizable(true)] public Style HeaderTextStyle { get { Style s = (Style)(ViewState["HeaderTextStyle"] == null ? Styles.defaultHeaderStyle : ViewState["HeaderTextStyle"]); return s; } set { ViewState["HeaderTextStyle"] = value; } }
oh and Styles.defaultHeaderStyle is just a property from an ...

Go to the complete details ...