NullReferenceException was threw out when adding AddAjaxSetting in Content Page

2 posts, 0 answers
  1. TravelMan
    TravelMan avatar
    4 posts
    Member since:
    Feb 2009

    Posted 22 Feb 2010 Link to this post


    I put RadAjaxManager and RadAjaxLoadingPanel in Master page and try to call AddAjaxSetting in content page. The NullReferenceException thew out.

    here is code in content page


    protected void Page_Load(object sender, EventArgs e)



    searchButton = (Button)this.SearchCriteria.FindControl("btnSearch");



    RadAjaxManager AjaxManager = (RadAjaxManager)this.Master.FindControl("RadAjaxManager1");



    this.radGrid, null);



    if (!IsPostBack)



    // BuildGrid();



    Here is code in master page



    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">












    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"












    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'






    style="border: 0px;" />








  2. Iana Tsolova
    Iana Tsolova avatar
    3388 posts

    Posted 23 Feb 2010 Link to this post

    Hi Lei,

    Please try using the RadAjaxManager.GetCurrent() static method to get reference to the RadAjaxManager placed in the master page and see if it makes any difference:

    protected void Page_Load(object sender, EventArgs e) 
        RadAjaxManager AjaxManager = RadAjaxManager.GetCurrent(Page);

    Additionally, you can check the below articles for more information on how to use RadAjax in master/content page scenarios:

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top