This is a migrated thread and some comments may be shown as answers.

Changing MasterPage id breaks RadAjaxManager

4 Answers 76 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jacky Chau
Top achievements
Rank 1
Jacky Chau asked on 28 Feb 2008, 10:43 PM
I have a RadAjaxManager and RadScriptManager on a masterpage.  I overrode the MasterPage's OnInit method and set the ID to 'mp'.  By default, it's 'ctl00'.  This breaks RadAjaxManager in that all ajax callbacks become regular postbacks.  Not a huge deal but it would be nice if this is fixed so I can shorten the ID just a bit.  My page is fairly complex and all those nesting INamingContainers are making control IDs really really long.

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 29 Feb 2008, 06:15 PM
Hi Jacky Chau,

We do not recommend changing the masterpage's id as this may lead to unexpected behavior of controls that are already added to the page. For example if there are some javascript code that is build on the server, and it is referencing some controls by id it will point to different control id's as the page id has changed.  

Best wishes,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jacky Chau
Top achievements
Rank 1
answered on 29 Feb 2008, 06:22 PM
Hi Rosen,

Control clientIDs shouldn't be hardcoded into javascript in the first place so that shouldn't be an issue.  If the javascript is built on the server, the id should be accessed through a control's ClientID property which will have the correct value as long as the control has been added to the control tree.  And javascript built on the server usually occurs during PreRender or Render, but I am changing the masterpage's ID during OnInit.  I agree that it is not common to change the masterpage's ID but don't think RadAjaxManager should break because of it.
0
Jacky Chau
Top achievements
Rank 1
answered on 14 Mar 2008, 09:20 PM
Any updates on whether this will be fixed in release?
0
Rosen
Telerik team
answered on 17 Mar 2008, 09:27 AM
Hi Jacky,

Unfortunately RadAjax Prometheus does not support this scenario. We are sorry for the inconvenience and hope this is not a show stopper for you.

Best regards,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Jacky Chau
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jacky Chau
Top achievements
Rank 1
Share this question
or