hello all of u !
i m begging in c# and making one program in asp.net !
i have very simple query ,
public partial class _Default : System.Web.UI.Page
{
public String str;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
str = "abcd";
Label1.Text = str;
}
protected void Button2_Click(object sender, EventArgs e)
{
Label1.Text = str;
}
}
in above code when i press button1 then label1 text become abcd
but when i press button2 then label1 text become empty !
how can i acess this value in button2 event ???