protected override void OnLoad(EventArgs e)
        {
            Page.Master.EnableViewState = false;
            ((SligoCS.Web.WI.WI)Page.Master).SetPageHeading(SetPageHeading());
            Page.Title = Page.Title + " - " + SetPageHeading();

            //SetLinkChangeSelectedSchoolOrDistrict(ChangeSelectedSchoolOrDistrict);

            if (Database != null)
            {
                QueryMarshaller.AutoQuery(Database);
                DataSet = Database.DataSet.Copy();
            }

            OnSetGridColumnVisibility();

            if (Graph != null)
            {
                //Don't display the graph if Compare To Selected is All
                Graph.Visible = !(
                    (GlobalValues.CompareTo.Key == CompareToKeys.SelDistricts || GlobalValues.CompareTo.Key == CompareToKeys.SelSchools) &&
                    GlobalValues.S4orALL.Key == S4orALLKeys.AllSchoolsOrDistrictsIn
                    );

                //if not already hidden, Check whether there is any data to graph.
                if (Graph.Visible)
                {
                    Graph.Visible = (DataSet.Tables[0].Rows.Count != 0);
                }
                //Always show when debug = graph
                if ((GlobalValues.TraceLevels & TraceStateUtils.TraceLevels.graph) == TraceStateUtils.TraceLevels.graph)
                {
                    Graph.Visible = true;
                }
            }

            //No Data message:
            if (DataSet.Tables.Count > 0 && DataSet.Tables[0].Rows.Count <= 0)
            {
                ((WinssDataGrid)DataGrid).NoDataMessage.Visible = true;
            }

            //hide DataGrid Table
            if ((Request.QueryString["DETAIL"] != null) && (Request.QueryString["DETAIL"].ToString() != string.Empty))
            {
                string detailVal = Request.QueryString["DETAIL"];
                if (detailVal == "NO")
                {
                    DataGrid.Visible = false;
                }
            }

            //actually raises the Load Event, so child Pages' handler is not executed until this is called.
            base.OnLoad(e);

            if (!String.IsNullOrEmpty(TitleBuilder.Prefix))
            {
                rawCsvName = TitleBuilder.DownloadRawDataFileName(TitleBuilder.Prefix);
                Session.Add("RawCsvName", rawCsvName);
                Session.Add("RawCsvData", GenerateRawCsvData(DataSet));

                if (globalValues.SuperDownload.Key == SupDwnldKeys.True &&
                    !((GlobalValues.TraceLevels & TraceStateUtils.TraceLevels.globals) != 0))
                {
                    Response.Redirect("serveRawDataCsv.aspx");
                }
            }

            if (GlobalValues.SuperDownload.Key == SupDwnldKeys.False)
            {
                OnDataBindTable(); //must be called after Page Load has been
                if (Graph != null && Graph.Visible)
                {
                    OnDataBindGraph();
                }
            }
        }