Update Panel in ContentPage button Click not updating repeater in MasterPage

118 views Asked by At

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

1

There are 1 answers

0
eDev On BEST ANSWER

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.