Dude, where are my controls?

by ASP.NET AJAX Team | Comments 5

Hi all,

First of all let me introduce myself. My name is Rosen Konstantinov and I’m a developer at one of Telerik’s ASP.NET teams.

A few days ago, while working on updating our Prometheus RadAjaxManager’s design-time property builder for Microsoft’s VS2008, I came across something strange.  Some of you know that RadAjaxManager’s property builder lets you choose which of the control(s) on the design surface should be updated during an AJAX call.  This is done by iterating over the controls collection and populating two TreeView controls. 


Properties Builder in VS2008

However, if placed inside the MasterPage’s ContentPlaceHolder, controls are not visible in the property builder in VS 2008 but work as expected in VS2005.  Here is what most of you are probably thinking “Strange, if you are only iterating over the controls collection why is there any difference? “ I was thinking the same. I sat with the trusty debugger to see what has gone wrong.  And only in a few minutes the problem was found.  While investigating the controls collection I have noticed that instead of being children of the ContentPlaceHolder control, where I have actually added them, my controls were gone. Actually, they were “re-parented” as children of some “ghost” control.   But the stranger thing was that all sub controls that were children of all page’s ContentPlaceHolders were added under this “ghost” controls. And unfortunately, there is no way to find out which control is from where.


The buttons are not in ContentPlaceHolder's controls collection


The buttons controls are "re-parented" to the "ghost" control

We will contact the guys at Microsoft and look for some workaround or fix for the problem. Stay tuned for more details.  In the mean time, please add the controls to the AjaxSettings from the source view of VS 2008 by using intellisense or an already set AjaxSetting and just change the initiator and updated controls in it.

About the author

Iana Tsolova

Iana Tsolova

is Program Manager of Telerik’s ASP.NET AJAX division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

5 Comments

Maxwell
Check out this thread in the forum. Microsoft is saying this is by design though they may consider fixing it. If you are aware of other controls (telerik or otherwise) it would be good to know about it so a case can be built to have them fix it. http://www.telerik.com/community/forums/thread/b311D-bbgthd.aspx
Shawn
Thank you so much for this post. I am curerntly going thru the *painful* process of converting an existing 2.0 web app to use Prometheus and was tearing my hair out last night trying to understand why my child pages controls were *still* not visible when using RadAjaxManagerProxy on the child page and RadAjaxManager on the master page. It never occurred to me that it may be because I am using VS2008. When I want design time control visibility I'll just use VS2005. Bless you, and thanks again! Shawn
Adam
So im guessing there is no fix for this. Trying to code this Ajaxmanager by hand is a pain in the butt.
Rosen
Actually this problem has been solved with Visual Studio 2008 SP1 Beta. You can download it from http://www.microsoft.com/downloads/details.aspx?familyid=CF99C752-1391-4BC3-BABC-86BC0B9E8E5A&displaylang=en
Markús
Has this problem reappeared in VS 2010. I am experiencing this when migrating a regular ASP.NET project to one using Telerik controls.

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by ASP.NET AJAX Team - or - read latest articles in Developer Tools