wince C++怎么对文本框赋值
1个回答
展开全部
解决方案
Session["UserName"]=textbox1.Text;
Session["PassWord"]=textbox2.Text;
if(Session["UserName"]!=null && Session["PassWord"]!=null)
{
Label1.Text=Session["UserName"];
Label2.Text=Session["PassWord"];
}
SESSION可能会丢失,用BUTTON的POSTBACKURL属性比较好:
A.aspx)
BUTTON1是点击的按钮
BUTTON1.postbackurl="b.aspx"
b.aspx)
page_load....
if page.ispostback=false then
If Not Page.PreviousPage Is Nothing Then
Dim txt As TextBox = CType(PreviousPage.FindControl("textbox1"), TextBox)
Label1.text = txt.Text
End If
end if
end if
Session["UserName"]=textbox1.Text;
Session["PassWord"]=textbox2.Text;
if(Session["UserName"]!=null && Session["PassWord"]!=null)
{
Label1.Text=Session["UserName"];
Label2.Text=Session["PassWord"];
}
SESSION可能会丢失,用BUTTON的POSTBACKURL属性比较好:
A.aspx)
BUTTON1是点击的按钮
BUTTON1.postbackurl="b.aspx"
b.aspx)
page_load....
if page.ispostback=false then
If Not Page.PreviousPage Is Nothing Then
Dim txt As TextBox = CType(PreviousPage.FindControl("textbox1"), TextBox)
Label1.text = txt.Text
End If
end if
end if
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询