子ページからasp.netマスターページのスパンにアクセスしたいので、そのマスターページにパブリックプロパティを作成しました-->
public partial class Ui_MasterPage_UI : System.Web.UI.MasterPage
{
public int tax = 0;
public string notification
{
set
{
(this.FindControl("notification") as HtmlAnchor).InnerText = value.ToString();
}
}
------------------//some code
}
子ページからこれにアクセスして、その htmlanchor タグにテキストを設定したいと考えています。
スクリプトを書いたので -->
子ページ
public partial class Ui_ProductDetails : System.Web.UI.Page
{
protected void ListView_ProductDetails_itemcommand(object sender, ListViewCommandEventArgs e)
{
Master.notification = "some text"; ////////showing error
------------------//some code
}
------------------//some code
}
しかし、構文エラーが発生しました。上記のコードに問題があると思います.,,,,それを確認してください....これを行う他の方法はありますか??? thnku