母版后台: public string DivContent
        {
            get { return this.divTitle.InnerText; }
            set { this.divTitle.InnerText = value; }

        }

内容中的样式:
    <asp:Button ID="Button1" runat="server" Text="赋值" Xonclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="设置母版中div的innderText" Xonclick="Button2_Click" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

内容后台:  protected void Button1_Click(object sender, EventArgs e)
        {
            this.Master.DivContent = "欢迎注册!";
        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            this.Label1.Text = this.Master.DivContent;
        }

posted on 2012-12-25 16:45  小菜鸟——  阅读(235)  评论(0编辑  收藏  举报