asp.netasp.net-ajaxupdatepanelmaster-pagescontent-pages

Update Panel in ContentPage button Click not updating repeater in MasterPage


I have an update panel inside contentpage when I click the button in there, I'm checking on breakpoint running this code block but its not refresing the masterpages controls. still empty repeater and also label. After that I try f5 on browser then updating.

 var master = Master as mpage;
        if (master != null)
        {
            master.function();  // here the function databinding repeater inside masterpage
            var rp= (Repeater)Master.FindControl("repeaterInMasterPage");
             
            rp.DataBind();
        }

but not refreshing the repeater in masterpage and also label control in masterpage.

Best Regards


Solution

  • I solved my problem via trying alternative ways.

    Just need to put the controls in an UpdatePanel on masterpage. And call update function of the UpdatePanel in content page codebehind.