protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); //set the URLs for the left hand hyperlinks if (!Page.IsPostBack) { SetLeftHandLinksText(); SetDataLinks(); SetHideShowNumbersLink(); SetScatterplotLink(); SetReadAboutLink(); SetGlossaryLink(); string qsChangeSchoolOrDistrict = user.GetQueryString( "FULLKEY", FullKeyUtils.StateFullKey(globals.FULLKEY)); qsChangeSchoolOrDistrict = QueryStringUtils.ReplaceQueryString(qsChangeSchoolOrDistrict, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.State]); qsChangeSchoolOrDistrict = QueryStringUtils.ReplaceQueryString(qsChangeSchoolOrDistrict, "DN", String.Empty); qsChangeSchoolOrDistrict = QueryStringUtils.ReplaceQueryString(qsChangeSchoolOrDistrict, "SN", String.Empty); this.ChangeSchoolOrDistrict.NavigateUrl = globals.CreateURL("~/selschool.aspx", qsChangeSchoolOrDistrict); ViewTitle.Text = globals.OrgLevel.Key + " View"; } }
protected void Page_Load(object sender, EventArgs e) { globals = ((PageBaseWI)Page).GlobalValues; string queryString = globals.GetQueryString(string.Empty, string.Empty); queryString = QueryStringUtils.ReplaceQueryString(queryString, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.State]); STATELevelData.NavigateUrl = "~/questions.aspx" + queryString; }
protected void Page_Load(object sender, EventArgs e) { globals = ((PageBaseWI)Page).GlobalValues; string qs = globals.GetQueryString( "FULLKEY", FullKeyUtils.StateFullKey(globals.FULLKEY)); qs = QueryStringUtils.ReplaceQueryString(qs, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.State]); qs = QueryStringUtils.ReplaceQueryString(qs, "DN", "None Chosen"); qs = QueryStringUtils.ReplaceQueryString(qs, "SN", "None Chosen"); EDITselection.NavigateUrl = "~/SelSchool.aspx" + qs; }
protected void Page_Load(object sender, EventArgs e) { globals = ((PageBaseWI)Page).GlobalValues; set_link_item("WINSS", "~/questions.aspx", "Wins_Mortar_Guide", "wins_big", "mortar_big", "guide_big"); data_big_gif.NavigateUrl = "~/questions.aspx" + globals.GetQueryString(string.Empty, string.Empty); }
/// <summary> /// Sets the link text for "School", "District", and "State" on the left hand side of page. /// Per comments in bug 513 Comment 3 /// </summary> private void SetLeftHandLinksText() { string schoolName = string.Empty; string districtName = string.Empty; string school_NavigateUrl = string.Empty; string district_NavigateUrl = string.Empty; string queryString = user.GetBaseQueryString(); string schoolType = string.Empty; linkState.ForeColor = System.Drawing.Color.White; //if (Page is PageBaseWI) PageBaseWI typedPage = (PageBaseWI)Page; schoolName = typedPage.GlobalValues.Agency.Schoolname; districtName = typedPage.GlobalValues.Agency.DistrictName; if (!String.IsNullOrEmpty(schoolName)) { linkSchool.Text = schoolName; queryString = QueryStringUtils.ReplaceQueryString(queryString, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.School]); if (globals.OrgLevel.Key != OrgLevelKeys.School && user.OrgLevel.Key == OrgLevelKeys.School) {//detect override of state linkSchool.Visible = false; } else if (globals.OrgLevel.Key == OrgLevelKeys.School) { school_NavigateUrl = String.Empty; } else { school_NavigateUrl = queryString.ToString(); } } else { linkSchool.Text = "Show Schools"; school_NavigateUrl = globals.CreateURL("~/SchoolScript.aspx", globals.GetQueryString("SEARCHTYPE", "SC")); } linkSchool.NavigateUrl = school_NavigateUrl; // linkDistrict.Text = districtName; if (!String.IsNullOrEmpty(districtName) && districtName.Trim() != "Entire State") { linkDistrict.Text = districtName; queryString = QueryStringUtils.ReplaceQueryString(queryString, globals.OrgLevel.Name, globals.OrgLevel.Range[OrgLevelKeys.District]); if (Request.QueryString["OrgLevel"] != null) { if (Request.QueryString["OrgLevel"].ToString() != string.Empty) { if (globals.OrgLevel.Key != OrgLevelKeys.District && user.OrgLevel.Key == OrgLevelKeys.District) {//detect override of state linkDistrict.Visible = false; } else if (globals.OrgLevel.Key == OrgLevelKeys.District) { district_NavigateUrl = String.Empty; } else { district_NavigateUrl = queryString.ToString(); } } } } else { linkDistrict.Text = "None Chosen"; } linkDistrict.NavigateUrl = district_NavigateUrl; if (globals.CompareTo.Key == CompareToKeys.SelSchools || globals.CompareTo.Key == CompareToKeys.SelDistricts) { linkState.Visible = false; } if (globals.OrgLevel.Key != OrgLevelKeys.State && user.OrgLevel.Key == OrgLevelKeys.State) { // Detect an override linkState.Visible = false; } }