Change panel "visible" property on MasterPage from Child pages
Posted
by Vitor Reis
on Stack Overflow
See other posts from Stack Overflow
or by Vitor Reis
Published on 2010-06-11T16:48:15Z
Indexed on
2010/06/11
16:52 UTC
Read the original article
Hit count: 302
I want to show some panel with a label that is located on a MasterPage from inside it's child pages.. I already did the coding on the MasterPage:
public class MyMaster : MasterPage
{
public void ShowPanel(string pMessage)
{
labelInside.Text = pMessage;
myPanel.visible = true;
}
}
Then I make the calls from child pages:
public void ShowPanel(string pMessage)
{
MyMaster masterPage = this.Master as MyMaster;
masterPage.ShowPanel(pMessage);
}
This "works" ok, but it won't show nothing, since I need the page to be "refreshed" in an "ajax-way" like an UpdatePanel, which I can't use because the Trigger is in another page, right?
I really need this to work.. even if you have another completely different way to do this, I would appreciate.
© Stack Overflow or respective owner