2009年7月11日 星期六

[RFID project]在Master下, A, B網頁傳變數方式

[一般網頁Form傳遞變數],之前有講過了。
現在加上Master則不能用舊有的方式接收變數。
必須先抓到master的容器,才能找到對應的變數。

以下是範例
A網頁:



B網頁:


重點在於
ContentPlaceHolder ContentPlaceHolder1 = Page.PreviousPage.Master.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
TextBox textbox1 = ContentPlaceHolder1.FindControl("tag") as TextBox;




Reference: http://itgroup.blueshop.com.tw/ianchen/design543?n=convew&i=3997

沒有留言:

張貼留言