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

RadAjaxManager.GetCurrent(Page) throws "Object not set.." exception

0 Answers 130 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Stephan
Top achievements
Rank 1
Stephan asked on 17 Jul 2009, 04:56 PM
Hi all, I have struggling with this the whole day, but finally found the problem. I will post this so someone else can benefit from this.

I have a masterpage and a content page. On the masterpage I have a link which opens a modaldialog Radwindow. After closing this window I want to refresh some items on the the content page. I couldn't get this working.In the javascript which I use to trigger the ajaxrequest in the CodeBehind of the content page, I could not use the $find("<%=RadAjaxManager.GetCurrent(Page).clientId%>". When trying to run the app, this threw the famous "Object not set.."-exception. I couldn't figure it out, why this was not working. Also, when I replaced this part with: MasterPage.FindControl(), the application did compile, but the AjaxRequest was only triggered the first time. After that, it was not executed anymore. 

The reason for both problems (object not set and AjaxRequest only firing the first time), was cause, due to the fact that I had place my RadAjaxScript-manager not after the <form>-tag, but just before the </form>-tag. So when I moved it to the top, everything started working.

Maybe the Telerik guys could put a note in the documentation about this issue.

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
Stephan
Top achievements
Rank 1
Share this question
or