在子页中的对象加载到母版页时会发生改变,比如子页中的对象TextBox1 到母版页中变成了ctl00$ContentPlaceHolder1$TextBox1。
masterpage页中加载js函数show_cele_date(eP,d_start,d_end,t_object)
在子页的Page_load()
对一个textbox加载一个属性 并调用js中的方法,传递textbox这个对象到js函数中
this.TextBox1.Attributes.Add("OnFocus", "show_cele_date(ctl00$ContentPlaceHolder1$TextBox1,'','', ctl00$ContentPlaceHolder1$TextBox1)");
在模版页中TextBox1对象转化成
ctl00$ContentPlaceHolder1$TextBox1
现在怎么能在子页的pageload中取得这个对象呢。
this.TextBox1.Attributes.Add("OnFocus", "show_cele_date(TextBox1,'','',TextBox1)");