in my web application i am checking session state like this.. in page load even of one of the page but it is every time session is not null is showing see this is my code...
if (Session["my"] != null)
{
Response.Write("hi");
}
else
{
Response.Redirect("default.aspx");
}
this is the page where i am assigning value to the session like this i am taking one button and one link button and write the code like this
protected void btn_Click(object sender, EventArgs e)
{
Session["my"] = "surya";
Response.Redirect("default1.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("default1.aspx");
}
but every time it is showing i mean even i click on link button it is showing "hi" message can u help me is there any ispostback problem is there