protected void Page_Load(object sender, EventArgs e) { if (!HttpContext.Current.IsDebuggingEnabled && Session["Username"] == null) { Response.BufferOutput = true; Response.Redirect("~/Login.aspx"); return; } if (!IsPostBack) { // Load data BindGrid(); } selectHandler = new RowSelectHandler(Grid); }
protected void Page_Load(object sender, EventArgs e) { selectHandler = new RowSelectHandler(Grid); if (!HttpContext.Current.IsDebuggingEnabled && Session["Username"] == null) { Response.BufferOutput = true; Response.Redirect("~/Login.aspx"); return; } if (!IsPostBack) { BindGrid(); BindDropTinh(); BindDropKhoa(); btnUpdate.Visible = false; btnCancel.Visible = false; } }