I want to change div style (display) in master page from my child page , I used:
protected void ShowMsgText(int MsgID)
{
HtmlGenericControl MsgInner;
MsgInner =((HtmlGenericControl)Master.FindControl("MsgInner"));
MsgInner.Attributes["class"] = "MsgInnerShow";
}
The Problem : I want to change the class from update panel , the div in master page Not in the update panel , any way to achieve this without need to move the update panel to master page .
Without the UpdatePanel you would use FindControl to change the class.
But since you use an UpdatePanel, the easiest way is to use jQuery.
On the master page the Panel and the script
Then in the code behind of the aspx page, you can call that javascript function on PostBack.