protected void Page_Load(object sender, EventArgs e) { userName = User.Identity.Name; goalMngr = new GoalManager(); viewExercises.userControlEventHappened += new EventHandler(viewExercises_userControlEventHappened); if (!Page.IsPostBack) { viewGoalsBtn.Enabled = false; addGoalBtn.Enabled = true; if (goalMngr.getUnachievedExerciseGoalsFromUser(userName, Convert.ToInt32(orderByRbl.SelectedValue)).Count < 1) exerciseGoalMultiView.ActiveViewIndex = 1; else { exerciseGoalMultiView.ActiveViewIndex = 2; loadExerciseGoals(); } } }