Stupid ASP.NET designer: "could not be set on property" error message

by timvasil 11/5/2007 12:24:00 PM

I hardly ever use the designer, but when creating custom controls I like to do a cursory check in the design view to make sure nothing barfs too badly.

In the process of creating a menu control, everything worked great in the HTML view and at runtime, but in the designer I was puzzled to see this error:

The error is confusing since 'Menu' is a property of test:MenuControl.  Why would the designer be trying to set a property of the control to a reference to the control? 

Solution:  As it turns out, the problem stems from the fact that the control collection I was using as the 'Menu' property had a setter. That's it. As soon as I took out the setter, the designer was happy.

Stupid designer.

Tags:

ASP.NET

Comments (1) -

11/6/2009 4:38:42 AM

NinjaCross

FYK, here is a couple of hotfixes for that problem
code.msdn.microsoft.com/.../ProjectReleases.aspx
code.msdn.microsoft.com/.../ProjectReleases.aspx

NinjaCross Italy

Add comment




  Country flag
biuquote
  • Comment
  • Preview
Loading


Search

Calendar

«  May 2012  »
SuMoTuWeThFrSa
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Recent comments

Archive