session code in page load in asp.net c#

Page_Load Event

 protected void Page_Load(object sender, EventArgs e)
        {
         
            if (Session["UserID"] == null)
                Response.Redirect("~/Login.aspx");
            GetUserRoleid(Convert.ToInt32(Session["UserID"]));
            if (!IsPostBack)
            {
                bindGrid(Convert.ToInt32(Session["UserID"]), Convert.ToInt32(Session["StatusID"]));
            }
        }

Comments

Post a Comment

Popular posts from this blog

String Program in C#

CSV using XmlNode

Controller_Model. cs