S
summer00
Hi everyone,
I found that the value of a variable(string type for example) is lost
after the aspx page postback.
E.G:
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
abc = "xyz";
}
private void Command1_Click(object sender,System.EventArgs e)
{
Response.Write(abc);
}
I have assigned the abc value to "xyz" , but after i click the command
button, i found that the value of abc is lost. The code "
Response.Write(abc)" shows nothing .May i know what's wrong with it ?
Thx a lot
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
I found that the value of a variable(string type for example) is lost
after the aspx page postback.
E.G:
private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
abc = "xyz";
}
private void Command1_Click(object sender,System.EventArgs e)
{
Response.Write(abc);
}
I have assigned the abc value to "xyz" , but after i click the command
button, i found that the value of abc is lost. The code "
Response.Write(abc)" shows nothing .May i know what's wrong with it ?
Thx a lot
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*