To check session null or not.

Jitendrasoft09
Posted by Jitendrasoft09 under ASP.NET category on | Points: 40 | Views : 1029
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{

protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
if (Session["UserRole"] == null)
{
Response.Redirect("Default.aspx");
}

}
}

Comments or Responses

Login to post response