5

Here's the situation:
I have a host page that loads a custom web user control. In my web control I want use javascript and a RadAjaxManager to load up a second web user control. I used this example from Telerik as my guide:
http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/clientsideapi/defaultvb.aspx

However, I kept getting the following error when I would call the client-side "ajaxRequest" method on the RadAjaxManager.

TypeError: Cannot read property 'id' of undefined
Airn5475
  • 2,452
  • 29
  • 51

2 Answers2

10

Another reason this error can happen is not having clientIDMode="AutoID" attribute in the <pages> element of your web.config

Brian Ogden
  • 18,439
  • 10
  • 97
  • 176
6

I finally figured it out!
On my parent web control I already had implemented a RadAjaxManager. So when I loaded up my second web control with its own RadAjaxManager, the javascript was getting confused as to which manager to use.

Enter: RadAjaxManagerProxy -> http://www.telerik.com/help/aspnet-ajax/ajax-ajaxmanagerproxy.html

After implementing this, my controls worked beautifully!

Hope this helps others, if not myself later down the road when I forget.

Airn5475
  • 2,452
  • 29
  • 51
  • Did you really answer your question at the exact same time you asked it? – Francis P Dec 06 '12 at 21:45
  • 4
    @FrancisP No, I actually worked on it until I figured it out. I then posted it out here and answered it myself; exercising the "Answer your own question" option. http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/ – Airn5475 Dec 07 '12 at 13:55