在第一页page1.aspx中 namespace page1 class pageClass{ public string s; .... s=TextBox1.text; public string[] k=new string(6){"111","222","333","444","555","666"}; Server.Transfer("page2.aspx"); } 在第二页page1.aspx中 page_load { page1.pageClass p1=(page1.pageClass)content.handle; string a=pq.s; string[] b=pg.k; }
我有些看不明白........第二页page1.aspx?
我现在直接引用 第一页 public aa as string="dddddddddd" Private Sub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click ' Server.Transfer("bgyp_tianjia.aspx") ' ' Response.Redirect("bgyp_tianjia.aspx", False) Response.Write("<script>open('bgyp_tianjia.aspx',400,600)</script>") End Sub 第二页 sub page load dim pg as new page1 txt.text=pg.aa end sub----------------------- 不知道合理不合理哦
我真纳闷 为什么不能引用 生成实例的控件呢?dim aa as new page1text=aa.txt1.text'aa里的控件不能引用?
namespace page1
class pageClass{
public string s;
....
s=TextBox1.text;
public string[] k=new string(6){"111","222","333","444","555","666"};
Server.Transfer("page2.aspx");
}
在第二页page1.aspx中
page_load
{
page1.pageClass p1=(page1.pageClass)content.handle;
string a=pq.s;
string[] b=pg.k;
}
public aa as string="dddddddddd"
Private Sub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click
' Server.Transfer("bgyp_tianjia.aspx")
'
' Response.Redirect("bgyp_tianjia.aspx", False)
Response.Write("<script>open('bgyp_tianjia.aspx',400,600)</script>")
End Sub
第二页
sub page load
dim pg as new page1
txt.text=pg.aa
end sub-----------------------
不知道合理不合理哦