public void GoToPage(PagesTypes page) { switch (page) { case PagesTypes.Login: //Close last opened usercontrol, .... //open new usercontrol login = new LoginUserControl(); contentpresenter.content = login; break; //other pages cases .... } currentOpenedPage = page; }
//----------------------------------------------- //FirstLoad //----------------------------------------------- protected void FirstLoad(Label lblResult, Button btnSave) { this.lblResult = lblResult; this.btnSave = btnSave; //------------------------- lblResult.Text = ""; //Get page type if (MoversFW.Components.UrlManager.ChechIsValidParameter("id")) { pageType = PagesTypes.AdminEdit; } if (!IsPostBack) { HandelControls(); LoadData(); } }