1.先找到链接的页的母版页this.PreviousPage.Master
2.从母版页中findControl的ContentPlaceHolder对象
3.从这个ContentPlaceHolder对象中找到相应的控件对象
TextBox tb = (TextBox)PreviousPage.Master.FindControl("ContentPlaceHolder1").FindControl("TextBox1");
Respone.ReDirect(url)后,从url页面中不会找previouspage
只能使用Server.transfer(url),与button ,imageButton的postbackurl,才能使用this.previouspage
本文介绍了在ASP.NET中如何从重定向页面获取母版页中的控件,并通过特定的方法实现页面间的跳转。主要涉及的技术包括使用this.PreviousPage.Master.FindControl及ContentPlaceHolder对象定位控件。
1228

被折叠的 条评论
为什么被折叠?



