asp.net 变量保存方法

 发送页:
    1.定义静态变量:  public static string str="";
    2. str=this.TextBox1.Text;
       Server.Transfer("webform2.aspx");
 接收页:
    1.引入第一页的命名空间:using WebApplication1;
    2  this.TextBox1.Text=WebForm1.str;

如为自身页面引用则可以不用public而用private就行.


其它的方法同传统的如session,cookie,application,url等

posted @ 2006-07-29 11:41  随风而去  阅读(299)  评论(0编辑  收藏  举报