Hi Kwesi,
Looks like you need to check the logic of the code. The logic in the below code is like you are setting the session to null always (after every button click). I was wondering, why is there, a need to use the if condition.
protected void Button1_Click(object sender, EventArgs e)
{
Session["New"] = null;
if (Session["New"] != null)
{
Label1.Text += Session["New"].ToString();
}
else
{
Response.Redirect("Login.aspx");
}
During the page load, you can assign the session to a label if you are redirecting from the Login page to the Welcome page. (As per Jignesh Khart's comment)
Thanks,