protected void Page_Load(object sender, EventArgs e) { try { if (HttpContext.Current.Session["UserDetails"] != null) { DataTable dtUserName = (DataTable)HttpContext.Current.Session["UserDetails"]; lblUserName.Text = Convert.ToString(dtUserName.Rows[0]["Name"]); string userRole = Convert.ToString(dtUserName.Rows[0]["RoleName"]); if (userRole.Equals("User")) { Response.Write("Welcome Mr User" + ":" + lblUserName.Text); //BindUserGrid(null); } } else { Response.Redirect("~/Signout.aspx"); } } catch (Exception ex) { throw ex; } }
primary key
grid view
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)