Hi ,
V can do this by calling the Page_Init() function.. I hope everybody have an idea abt this function.v are checking our session value on this function.
Code
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Page_Init(object sender, EventArgs e)
{
CheckSession();
}
private void CheckSession()
{
if (Session["SessionID"] == null)
{
Response.Redirect("Login.aspx"); // This means session haves no value
}
}
{
}
protected void Page_Init(object sender, EventArgs e)
{
CheckSession();
}
private void CheckSession()
{
if (Session["SessionID"] == null)
{
Response.Redirect("Login.aspx"); // This means session haves no value
}
}
I hope this will help you
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment