2个页面传值方法

第一个方法:根据ID直接访问前一页的控件的值

        

1TextBox txtValue = new TextBox();
2        txtValue = (TextBox)PreviousPage.FindControl("textBox1");
3        Label1.Text = txtValue.Text;

 

第二个方法:给前一页设置属性,在第二页中直接访问

 

Code

 

posted @ 2009-07-12 19:21  今晚打小鸡  阅读(282)  评论(0编辑  收藏  举报