当前位置: 代码迷 >> ASP.NET >> 新手有关问题
  详细解决方案

新手有关问题

热度:2251   发布时间:2013-02-25 00:00:00.0
新手问题!
有两个页面一个是one.aspx 一具是two.aspx 在one.aspx登录 username ,password后.如何让two.aspx获得username ,password的值?

------解决方案--------------------------------------------------------
one.aspx.cs:
Session["userName"] = this.textbox_UserName.Text;
Session["PWD"] = this.textbox_PWD.text;

in two.aspx.cs ,you could find the values of the sessions .ex.there are two labels in two.aspx.cs,the labels maybe do like follow:
this.lable1.text = Session["userName"].ToString();
this.label2.text = Session["PWD"].ToString();
  相关解决方案