0
我要访问从子页面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
}
但得到的语法错误 我认为上面的代码中有一些问题,,,,,所以PLZ审查它...... 是否有任何其他方式来做到这一点??? thnku
请添加你所得到的错误消息。 – Joe