protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { MasterPage.setCurrentPage(this); lgCtrl = GetControl(); StationeryStoreInventorySystemController.Util.PutSession(sessionKey, lgCtrl); } else { lgCtrl = (LoginControl) StationeryStoreInventorySystemController.Util.GetSession(sessionKey); if (lgCtrl == null) { lgCtrl = GetControl(); StationeryStoreInventorySystemController.Util.PutSession(sessionKey, lgCtrl); } } }
private LoginControl GetControl() { if (lgCtrl == null) lgCtrl = new LoginControl(); return lgCtrl; }