マスターページの特定のコントロールに、それを使用するページからアクセスしたいので、次のコード行を記述します。
this.Master.FindControl("pnl_Buttonss").Visible = false;
今
ページ.designer.csから次の例外が発生します。
Unable to cast object of type 'ASP.masterpage2_master' to type 'GuideUI.MasterPage'.
public new GuideUI.MasterPage Master {
get {
return ((GuideUI.MasterPage)(base.Master));
}
}
これは例外をスローするコードです。このエラーを修正する方法