Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Compiling changes values in VS.NET

Apr 7 2003 9:09 AM
When I change the values of a System.Web.UI.WebControls.Style member variable using the Design view, and afterwards compile the project, those values are lost. No code was run at all, just compiled. Does anybody know how that is possible and how to solve it? The member variables are declared like this: private System.Web.UI.WebControls.Style headerStyle = new System.Web.UI.WebControls.Style(); And a selector is made like this: [Category("Appearance")] public System.Web.UI.WebControls.Style HeaderStyle { get { return headerStyle; } set { headerStyle = value; } } I already tried taking away the "new" statement in the declaration and then returning "new Style()" when the headerStyle is null, this crashed VS.NET when changing values. Anybody has an answer to this? All input appreciated.

Answers (1)