protected void Page_Load(object sender, EventArgs e) { if (Tile == null) return; // Simulate IsPostBack. String postBackControlID = GetControlThatCausedPostBack(Parent.Page); _isPostBack = !String.IsNullOrEmpty(postBackControlID) && !postBackControlID.StartsWith("folder") && !postBackControlID.StartsWith("tileContainer"); // Create the initial viewstate values. if (ViewState[_currentViewIdxKey] == null) { ViewState.Add(_currentViewIdxKey, 0); ViewState.Add(_gradeFilterKey, "All"); ViewState.Add(_subjectFilterKey, "All"); ViewState.Add(_termFilterKey, "All"); ViewState.Add(_testTypeFilterKey, "All"); } _userID = SessionObject.LoggedInUser.Page; // Set the current filter visibility. SetFilterVisibility(); SetGridHeaderText(); // Set the tab visibility. stateRadTab.Visible = UserHasPermission(Base.Enums.Permission.Tab_State_AssessmentResults); districtRadTab.Visible = UserHasPermission(Base.Enums.Permission.Tab_District_AssessmentResults); classroomRadTab.Visible = UserHasPermission(Base.Enums.Permission.Tab_Classsroom_AssessmentResults); switch (AssessmentResults_RadTabStrip.SelectedTab.Text) { case "State": IsStudentResponseVisible.Value = UserHasPermission(Permission.Reports_StudentResponses_State) ? "true" : "false"; break; case "District": IsStudentResponseVisible.Value = UserHasPermission(Permission.Reports_StudentResponses_District) ? "true" : "false"; break; case "Classroom": IsStudentResponseVisible.Value = UserHasPermission(Permission.Reports_StudentResponses_Classroom) ? "true" : "false"; break; } if (!_isPostBack) { var testSubjectDT = Subject.GetSubjectsByTests(); _currCourseList = CourseMasterList.GetCurrCoursesForUser(SessionObject.LoggedInUser); _currCourseList.RemoveAll(course => { return testSubjectDT.Select("Subject = '" + course.Subject.DisplayText + "'").Length == 0; }); BuildGrades(); BuildSubjects(); BuildTerms(); BuildTestTypes(); } BuildAssessments(); }