SharePoint serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely. In this case, it is the occassional musings, observations, and Ouija board readings about the phabulously

Intellisense for Properties on ASP.NET Custom Server Controls

Intellisense for Properties on ASP.NET Custom Server Controls

  • Comments 4
  • Likes

NOTE:  The solution described below is only necessary if your web page and custom control are in the same project.

I had this really not fun time this week blowing a couple of hours on something that should have been zero impact so I thought I'd share here.  I wrote a custom ASP.NET server control and then added to an ASPX page with the Register tag, and then added a tag for my control.  I then went to set one of the properties of the control in the attributes of the control tag in the ASPX, the way everyone is used to doing.  The really frustrating thing is that it wasn't showing any of my custom properties.  After messing around with it for a couple of hours and getting no where, I finally realized that I had to close Visual Studio 2010 completely, then reopen it to see the properties I had added.  Yes, don't be confused when looking at the calendar, it really is 2010.

So to get custom properties to show up in the ASPX Intellisense you need to:

  • Use properties that are Read / Write
  • Recompile your control and register in the GAC or place in the BIN of your ASP.NET app
  • Close Visual Studio
  • Reopen Visual Studio
  • Junk starts working

Hope this saves someone some time.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment