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

1 posts, 0 answers
  1. Stephan
    Stephan avatar
    71 posts
    Member since:
    Jul 2007

    Posted 17 Jul 2009 Link to this post

    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.
Back to Top