【发布时间】:2015-06-16 21:41:40
【问题描述】:
母版页:
public string strP;
public void Page_Load()
{
strP = @"SELECT * FROM ...";
}
内容页面:
public void Page_Load() {
if (!Page.IsPostBack) {
string strO = Master.strP; //strO = null
}
}
我知道我应该使用Page_Init,但有人可以帮助我确保我能够从内容页面获取strP 的设置值。
【问题讨论】:
标签: c#