In the Master page code behind file define the method you want to call as Public.
public partial class MasterPage : System.Web.UI.MasterPage
{
public void ShowLicenseErrorImage()
{
this.IMG_LicenseExceedWarn.Visible =
this.lblLicenseMisuse.Visible =
this.lblDetails.Visible = true;
}
public void HideLicenseErrorImage()
{
this.IMG_LicenseExceedWarn.Visible =
this.lblLicenseMisuse.Visible =
this.lblDetails.Visible = false;
}
}
Now in the content page code befind type the following.
MasterPage master = (MasterPage)this.Master;
master.ShowLicenseErrorImage();
Where “MasterPage” is the class name of class in master page.
Thats it!!!
July 1, 2009 at 9:26 pm |
Good one.
It works !!!!!!