I don't know how to refresh my Master Page (only) from a button click located in the ContentPlaceHolder part.
Here is an image explaining the situation (I blurred the useless part).
Things to know:
Blue : MasterPage
Green : Part of the MasterPage I want to refresh
Red : ContentPlaceHolder (another aspx page) of the MasterPage
I want to refresh the green part of the MasterPage with the Click event of the Button on the red part.
I tried an update Panel surrounding the green part and the trigger is the Click event of the Red part button but since it's not the same aspx page, it fails.
any ideas ?
EDIT: My code
Master page C# part:
public void UpdateComment()
{
this.UPDP_Obs.Update();
}
Master page Asp part:
<asp:UpdatePanel ID="UPDP_Obs" runat="server"
UpdateMode="Conditional">
<ContentTemplate>
<asp:Table CssClass="center" ID="TBL_ObsLA" runat="server">
<asp:TableRow runat="server">
<asp:TableCell>
Dernier commentaire Ligne Cal-1 A:
</asp:TableCell>
</asp:TableRow>
<asp:TableRow runat="server">
<asp:TableCell>
<asp:Label ID="LBL_DateLA" runat="server" Text=""></asp:Label> <br /> <br />
<asp:Label ID="LBL_ObsLA" runat="server" Text=""></asp:Label>
</asp:TableCell>
</asp:TableRow>
</ContentTemplate>
</asp:UpdatePanel>
ContentPlaceHolder c# part:
//Some Code to Update the comment in Sql to a Database (works)
MasterLavage MasterP = (MasterLavage)this.Master;
MasterP.UpdateComment();
I traced with the debugger, the compilation go through the UpdateComment method but the Updatepanel isnt refreshed (or at least the label isnt). When i refresh the full page (F5), the label is refreshed with the new comment
Any ideas ?