コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Check GUAM UserId, Role for NCIPL_CC
            if (GlobalUtils.UserRoles.getLoggedInUserId().Length == 0 || GlobalUtils.UserRoles.getLoggedInUserRole() < 1)
            {
                string currASPXfilename = System.IO.Path.GetFileName(Request.Path).ToString();
                Session["NCIPL_REGISTERREFERRER"] = currASPXfilename;
                Response.Redirect("~/login.aspx?msg=invaliduser&redir=" + currASPXfilename);
            }

            //Hide label error message
            lblErrorMsg.Visible = false;

            //Reset Session SEARCHORDER_CURRPAGE
            Session["SEARCHORDER_CURRPAGE"] = null;     //destroy

            if (!Page.IsPostBack)
            {
                //Display the master page tabs
                GlobalUtils.Utils UtilMethod = new GlobalUtils.Utils();
                if (Session["NCIPL_Pubs"] != null)
                {
                    Master.LiteralText = UtilMethod.GetTabHtmlMarkUp(Session["NCIPL_Qtys"].ToString(), "");
                }
                else
                {
                    Master.LiteralText = UtilMethod.GetTabHtmlMarkUp("", "");
                }
                UtilMethod = null;

                #region Bind the form here!
                //NCIPL_CC - Populate Customer Type Dropdown
                KVPairCollection kvpairColl = KVPair.GetKVPair("sp_NCIPLCC_getAllTypeOfCustomers");
                foreach (KVPair kvpair in kvpairColl)
                {
                    ListItem li = new ListItem();
                    li.Value = kvpair.Key;
                    li.Text  = kvpair.Val;
                    drpCustomerType.Items.Add(li);
                }
                kvpairColl = null;

                #endregion

                //Reset Sessions for Search Order Look up
                Session["SEARCHORDER_CUSTOMERTYPE"]     = null;     //destroy
                Session["SEARCHORDER_CUSTOMERTYPEDESC"] = null;     //destroy
                Session["SEARCHORDER_KEYWORD"]          = null;     //destroy

                Session["SEARCHORDER_SDATE"] = null;                //destroy
                Session["SEARCHORDER_EDATE"] = null;                //destroy

                Session["VIEW_CUSTID"]   = null;
                Session["VIEW_ORDERNUM"] = null;
                Session["VIEW_PREVPAGE"] = null;
            }
        }
コード例 #2
0
ファイル: refsearch.aspx.cs プロジェクト: NCIOCPL/pubslocator
        private void LoadData()
        {
            txtSearch.Text = Session["NCIPLEX_SearchKeyword"].ToString();

            ddlTOC.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getCancerTypes");
            ddlTOC.DataTextField  = "val";
            ddlTOC.DataValueField = "key";
            ddlTOC.DataBind();
            ddlTOC.Items.Insert(0, new ListItem("All Types", "-99"));
            if (Session["NCIPLEX_TypeOfCancer"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlTOC.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_TypeOfCancer"].ToString()) == 0)
                    {
                        ddlTOC.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }

            ddlCT.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getSubjects");
            ddlCT.DataTextField  = "val";
            ddlCT.DataValueField = "key";
            ddlCT.DataBind();
            ddlCT.Items.Insert(0, new ListItem("All Cancer Topics", "-99"));
            if (Session["NCIPLEX_Subject"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlCT.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_Subject"].ToString()) == 0)
                    {
                        ddlCT.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }

            ddlAud.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getAudience");
            ddlAud.DataTextField  = "val";
            ddlAud.DataValueField = "key";
            ddlAud.DataBind();
            ddlAud.Items.Insert(0, new ListItem("All Audiences", "-99"));
            if (Session["NCIPLEX_Audience"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlAud.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_Audience"].ToString()) == 0)
                    {
                        ddlAud.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }

            ddlLan.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getLanguages");
            ddlLan.DataTextField  = "val";
            ddlLan.DataValueField = "key";
            ddlLan.DataBind();
            ddlLan.Items.Insert(0, new ListItem("All Languages", "-99"));
            if (Session["NCIPLEX_Language"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlLan.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_Language"].ToString()) == 0)
                    {
                        ddlLan.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }

            ddlForm.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getProductFormats");
            ddlForm.DataTextField  = "val";
            ddlForm.DataValueField = "key";
            ddlForm.DataBind();
            ddlForm.Items.Insert(0, new ListItem("All Formats", "-99"));
            if (Session["NCIPLEX_ProductFormat"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlForm.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_ProductFormat"].ToString()) == 0)
                    {
                        ddlForm.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }

            ddlColl.DataSource     = KVPair.GetKVPair("sp_NCIPLex_getCollections");
            ddlColl.DataTextField  = "val";
            ddlColl.DataValueField = "key";
            ddlColl.DataBind();
            ddlColl.Items.Insert(0, new ListItem("All Collections", "-99"));
            if (Session["NCIPLEX_Series"].ToString().Length > 0)
            {
                int Cntr = 0;
                foreach (ListItem li in ddlColl.Items)
                {
                    if (string.Compare(li.Value, Session["NCIPLEX_Series"].ToString()) == 0)
                    {
                        ddlColl.SelectedIndex = Cntr;
                        break;
                    }
                    Cntr++;
                }
            }
        }
コード例 #3
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (Utils.ValidateRedirect().Length > 0) //Important check
            {
                Response.Redirect(Utils.ValidateRedirect(), true);
            }

            if (!Page.IsPostBack)
            {
                Session["NCIPLEX_SearchKeyword"] = "";
                Session["NCIPLEX_TypeOfCancer"]  = "";
                Session["NCIPLEX_Subject"]       = "";
                Session["NCIPLEX_Audience"]      = "";
                Session["NCIPLEX_Language"]      = "";
                Session["NCIPLEX_ProductFormat"] = "";
                Session["NCIPLEX_StartsWith"]    = "";
                Session["NCIPLEX_Series"]        = "";
                Session["NCIPLEX_NewOrUpdated"]  = "";
                Session["NCIPLEX_Race"]          = "";


                if (Request.QueryString["cantype"] != null)
                {
                    Session["NCIPLEX_TypeOfCancer"] = Request.QueryString["cantype"];
                }
                else if (Request.QueryString["subj"] != null)
                {
                    Session["NCIPLEX_Subject"] = Request.QueryString["subj"];
                }
                else if (Request.QueryString["aud"] != null)
                {
                    Session["NCIPLEX_Audience"] = Request.QueryString["aud"];
                }
                else if (Request.QueryString["lang"] != null)
                {
                    Session["NCIPLEX_Language"] = Request.QueryString["lang"];
                }
                else if (Request.QueryString["form"] != null)
                {
                    Session["NCIPLEX_ProductFormat"] = Request.QueryString["form"];
                }
                else if (Request.QueryString["starts"] != null)
                {
                    Session["NCIPLEX_StartsWith"] = Request.QueryString["starts"];
                }
                else if (Request.QueryString["coll"] != null)
                {
                    Session["NCIPLEX_Series"] = Request.QueryString["coll"];
                }
                else if (Request.QueryString["newupt"] != null)
                {
                    Session["NCIPLEX_NewOrUpdated"] = Request.QueryString["newupt"];
                }
                else if (Request.QueryString["race"] != null)
                {
                    Session["NCIPLEX_Race"] = Request.QueryString["race"];
                }


                //Begin - Code to show search criteria on search results
                Session["NCIPLEX_Criteria"] = "";
                string SearchCriteria = "";
                GlobalUtils.Utils.InitializeCriteriaTextSessionVariables(); //CR-31 HITT 7074
                if (Session["NCIPLEX_TypeOfCancer"].ToString().Length > 0)
                {
                    KVPairCollection collCancerTypes = KVPair.GetKVPair("sp_NCIPLex_getCancerTypes");
                    foreach (KVPair kvItem in collCancerTypes)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_TypeOfCancer"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("TypeOfCancer", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }

                if (Session["NCIPLEX_Subject"].ToString().Length > 0)
                {
                    KVPairCollection collSubjects = KVPair.GetKVPair("sp_NCIPLex_getSubjects");
                    foreach (KVPair kvItem in collSubjects)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_Subject"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("Subject", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }
                if (Session["NCIPLEX_ProductFormat"].ToString().Length > 0)
                {
                    KVPairCollection collProdFormats = KVPair.GetKVPair("sp_NCIPLex_getProductFormats");
                    foreach (KVPair kvItem in collProdFormats)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_ProductFormat"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("ProductFormat", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }
                if (Session["NCIPLEX_Series"].ToString().Length > 0)
                {
                    KVPairCollection collSeries = KVPair.GetKVPair("sp_NCIPLex_getCollections");
                    foreach (KVPair kvItem in collSeries)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_Series"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("Series", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }
                if (Session["NCIPLEX_NewOrUpdated"].ToString().Length > 0)
                {
                    KVPairCollection collProdUpdates = KVPair.GetKVPair("sp_NCIPLex_getProductUpdates");
                    foreach (KVPair kvItem in collProdUpdates)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_NewOrUpdated"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("NewOrUpdated", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }
                if (Session["NCIPLEX_Language"].ToString().Length > 0)
                {
                    KVPairCollection collLanguages = KVPair.GetKVPair("sp_NCIPLex_getLanguages");
                    foreach (KVPair kvItem in collLanguages)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_Language"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("Language", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }
                if (Session["NCIPLEX_Audience"].ToString().Length > 0)
                {
                    KVPairCollection collAudience = KVPair.GetKVPair("sp_NCIPLex_getAudience");
                    foreach (KVPair kvItem in collAudience)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_Audience"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("Audience", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }

                if (Session["NCIPLEX_StartsWith"].ToString().Length > 0)
                {
                    if (SearchCriteria.Length == 0)
                    {
                        SearchCriteria = Session["NCIPLEX_StartsWith"].ToString();
                    }
                    else
                    {
                        SearchCriteria = SearchCriteria + ", " + Session["NCIPLEX_StartsWith"].ToString();
                    }
                    GlobalUtils.Utils.SetCriteriaText("StartsWith", Session["NCIPLEX_StartsWith"].ToString()); //HITT 7074 CR-31
                }

                if (Session["NCIPLEX_Race"].ToString().Length > 0)
                {
                    KVPairCollection collRace = KVPair.GetKVPair("sp_NCIPLex_getRace");
                    foreach (KVPair kvItem in collRace)
                    {
                        if (string.Compare(kvItem.Key, Session["NCIPLEX_Race"].ToString(), true) == 0)
                        {
                            if (SearchCriteria.Length == 0)
                            {
                                SearchCriteria = kvItem.Val;
                            }
                            else
                            {
                                SearchCriteria = SearchCriteria + ", " + kvItem.Val;
                            }
                            GlobalUtils.Utils.SetCriteriaText("Race", kvItem.Val); //HITT 7074 CR-31
                        }
                    }
                }

                Session["NCIPLEX_Criteria"] = SearchCriteria;

                //End Code

                /*Begin CR-31 - HITT 9815 */
                GlobalUtils.Utils objUtils    = new GlobalUtils.Utils();
                string            QueryParams = objUtils.GetQueryStringParams();
                objUtils = null;
                /*End CR-31 - HITT 9815 */

                if (Session["NCIPLEX_NewOrUpdated"].ToString().Length > 0) //HITT 8300 - New & Updated now has its own page
                {
                    Response.Redirect("newupdated.aspx");
                }
                else
                {
                    //CR-31 HITT 9815 Response.Redirect("searchres.aspx");
                    Response.Redirect("searchres.aspx" + "?sid=" + QueryParams);
                }
            }
        }
コード例 #4
0
ファイル: home.aspx.cs プロジェクト: NCIOCPL/pubslocator
        protected void Page_Load(object sender, EventArgs e)
        {
            //Check GUAM UserId, Role for NCIPL_CC
            if (GlobalUtils.UserRoles.getLoggedInUserId().Length == 0 || GlobalUtils.UserRoles.getLoggedInUserRole() < 1)
            {
                string currASPXfilename = System.IO.Path.GetFileName(Request.Path).ToString();
                Session["NCIPL_REGISTERREFERRER"] = currASPXfilename;
                Response.Redirect("~/login.aspx?msg=invaliduser&redir=" + currASPXfilename, true);
            }

            //Moving this to default page
            //if (Session["JSTurnedOn"] == null)
            //    Session["JSTurnedOn"] = "True"; //Assuming JavaScript is enabled, by default.

            ////Missing Session -- COMMENTED FOR NCIPLCC
            //if (Session["JSTurnedOn"] == null)
            //    Response.Redirect("default.aspx?missingsession=true", true);

            //For Hailstorm check length
            if (this.searchbar.Terms.Length > 100) //Using a hundred limit for search contains sp
            {
                Response.Redirect("default.aspx", true);
            }

            if (!Page.IsPostBack)
            {
                if (Request.QueryString["js"] != null) //Test for JavaScript
                {
                    if (string.Compare(Request.QueryString["js"].ToString(), "2") == 0)
                    {
                        Session["JSTurnedOn"] = "False";
                    }
                }

                //Begin CR-36 - A quick way to turn off Featured Images
                if (ConfigurationManager.AppSettings["TurnOffFeaturedImages"] != null)
                {
                    TurnOffFeaturedImages = ConfigurationManager.AppSettings["TurnOffFeaturedImages"];
                }
                //End CR-36

                ////***EAC Create the session variables asap
                Session["PUBENT_SearchKeyword"] = "";
                Session["PUBENT_TypeOfCancer"]  = "";
                Session["PUBENT_Subject"]       = "";
                Session["PUBENT_Audience"]      = "";
                Session["PUBENT_ProductFormat"] = "";
                Session["PUBENT_Language"]      = "";
                Session["PUBENT_StartsWith"]    = "";
                Session["PUBENT_Series"]        = ""; //Or collection
                Session["PUBENT_NewOrUpdated"]  = "";
                Session["PUBENT_Race"]          = "";
                Session["PUBENT_Criteria"]      = "";


                ListCancerTypes.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getCancerTypes");
                ListCancerTypes.DataBind();
                ListSubjs.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getSubjects");
                ListSubjs.DataBind();
                ListProductFormat.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getProductFormats");
                ListProductFormat.DataBind();
                ListCollections.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getCollections");
                ListCollections.DataBind();
                //CR 11-001-36 ListProductUpdates.DataSource = KVPair.GetKVPair("sp_NCIPL_getProductUpdates");
                //CR 11-001-36 ListProductUpdates.DataBind();
                ListLanguages.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getLanguages");
                ListLanguages.DataBind();
                ListAudience.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getAudience");
                ListAudience.DataBind();
                ListRace.DataSource = KVPair.GetKVPair("sp_NCIPLCC_getRace");
                ListRace.DataBind();

                //ListAnnouncements.DataSource = KVPair.GetKVPair("sp_NCIPL_getAnnouncements");
                //ListAnnouncements.DataBind();
                ListAnnouncements.DataSource = Announcement.GetAnnouncements();
                ListAnnouncements.DataBind();
                if (ListAnnouncements.Items.Count == 0)
                {
                    divAnnouncements.Visible = false;
                }
                //ListFeatures.DataSource = KVPair.GetKVPair("sp_NCIPL_getFeatures");
                //ListFeatures.DataBind();
                //CR-36 ProductCollection p = DAL.DAL.GetProductFeatures();
                //CR-36 ListFeatures.DataSource = p;
                //CR-36 ListFeatures.DataBind();

                #region StackRelated
                //ListFeatures.DataSource = DAL.DAL.GetStacks(); //CR-36
                //ListFeatures.DataBind(); //CR-36
                #endregion
            }

            //Begin - Code for Appropriate Tabs
            GlobalUtils.Utils UtilMethod = new GlobalUtils.Utils();
            if (Session["NCIPL_Pubs"] != null)
            {
                Master.LiteralText = UtilMethod.GetTabHtmlMarkUp(Session["NCIPL_Qtys"].ToString(), "home");
            }
            else
            {
                Master.LiteralText = UtilMethod.GetTabHtmlMarkUp("", "home");
            }
            UtilMethod = null;
            //End Code for Tab
        }
コード例 #5
0
ファイル: shipping.aspx.cs プロジェクト: NCIOCPL/pubslocator
        protected void Page_Load(object sender, EventArgs e)
        {
            if (shoppingcartV2 == null || shoppingcartV2.Count < 1)
            {  //***EAC I need a shopping cart at this point
                GlobalUtils.Utils.ClearAllSessions();
                Response.Redirect("~/login.aspx", true);
            }
            if (!GlobalUtils.Utils.isLoggedin())
            {  //***EAC I need a logged in user at this point
                GlobalUtils.Utils.ClearAllSessions();
                Response.Redirect("~/login.aspx", true);
            }
            string role = GlobalUtils.Utils.LoggedinRole();

            if (role != "NCIPL_LM")
            {
                throw (new ArgumentException("Your role is not allowed at this point."));
            }
            if (!IsPostBack)
            {
                Session["NCIPLCC_PrinterSplitOrder"] = null; //NCIPL_CC
                steps1.Activate("cell3");

                //NCIPL_CC - Populate Customer Type Dropdown
                KVPairCollection kvpairColl = KVPair.GetKVPair("sp_NCIPLLM_getTypeOfCustomer");
                foreach (KVPair kvpair in kvpairColl)
                {
                    ListItem li = new ListItem();
                    li.Value = kvpair.Key;
                    li.Text  = kvpair.Val;
                    drpCustomerType.Items.Add(li);
                }
                kvpairColl = null;

                //NCIPL_CC - Populate Order Media Dropdown
                KVPairCollection kvpairColl2 = KVPair.GetKVPair("sp_NCIPLLM_getOrderMedia");
                foreach (KVPair kvpair in kvpairColl2)
                {
                    ListItem li = new ListItem();
                    //li.Value = kvpair.Key;
                    li.Value = kvpair.Val; //Non-critical data. Just use description to make the data retrieval from tbl_orderheader easy.
                    li.Text  = kvpair.Val;
                    drpOrderMedia.Items.Add(li);
                }
                kvpairColl2 = null;

                drpDelivery.DataSource     = DAL2.DAL.GetAllShippingMethods();
                drpDelivery.DataTextField  = "Val";
                drpDelivery.DataValueField = "Key";
                drpDelivery.DataBind();
                drpDelivery.Items.Insert(0, new ListItem("USPS", "S1"));
                drpDelivery.Items.Insert(0, new ListItem("Courier", "C1"));
                drpDelivery.Items.Insert(0, new ListItem("[Select a Shipping Method]", ""));

                drpCountry.DataSource     = drp2Country.DataSource = DAL2.DAL.GetCountries();
                drpCountry.DataTextField  = drp2Country.DataTextField = "Val";
                drpCountry.DataValueField = drp2Country.DataValueField = "Key";
                drpCountry.DataBind();
                drp2Country.DataBind();
                drpCountry.Items.Insert(0, new ListItem("UNITED STATES", "US"));
                drp2Country.Items.Insert(0, new ListItem("UNITED STATES", "US"));

                BindShippingInfo();   //Restore ship vals
                BindBillingInfo();
                BindExtraInfo();

                BindTotals(shipto != null ? shipto.State : "");
            }
        }
コード例 #6
0
ファイル: home.aspx.cs プロジェクト: NCIOCPL/pubslocator
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Utils.ValidateRedirect().Length > 0) //Important check
            {
                Response.Redirect(Utils.ValidateRedirect(), true);
            }

            //Moving this to default page
            //if (Session["JSTurnedOn"] == null)
            //    Session["JSTurnedOn"] = "True"; //Assuming JavaScript is enabled, by default.

            ////Missing Session
            //if (Session["JSTurnedOn"] == null)
            //    //Response.Redirect("default.aspx?missingsession=true", true);
            //    Response.Redirect("conf.aspx?missingjs=true", true);

            //For Hailstorm check length
            if (this.searchbar.Terms.Length > 100) //Using a hundred limit for search contains sp
            {
                Response.Redirect("default.aspx", true);
            }

            if (!Page.IsPostBack)
            {
                if (Request.QueryString["js"] != null) //Test for JavaScript
                {
                    if (string.Compare(Request.QueryString["js"].ToString(), "2") == 0)
                    {
                        Session["JSTurnedOn"] = "False";
                    }
                }

                ////***EAC Create the session variables asap
                //Session["NCIPL_Pubs"] = "";
                //Session["NCIPL_Qtys"] = "";
                //Session["PUBENT_SearchKeyword"] = "";
                //Session["PUBENT_TypeOfCancer"] = "";
                //Session["PUBENT_Subject"] = "";
                //Session["PUBENT_Audience"] = "";
                //Session["PUBENT_ProductFormat"] = "";
                //Session["PUBENT_Language"] = "";
                //Session["PUBENT_StartsWith"] = "";
                //Session["PUBENT_Series"] = ""; //Or collection
                //Session["PUBENT_NewOrUpdated"] = "";
                //Session["PUBENT_Race"] = "";


                //Added the session values clearing (other than pubids qtys) back for HITT 7432
                Session["NCIPLEX_SearchKeyword"] = "";
                Session["NCIPLEX_TypeOfCancer"]  = "";
                Session["NCIPLEX_Subject"]       = "";
                Session["NCIPLEX_Audience"]      = "";
                Session["NCIPLEX_ProductFormat"] = "";
                Session["NCIPLEX_Language"]      = "";
                Session["NCIPLEX_StartsWith"]    = "";
                Session["NCIPLEX_Series"]        = ""; //Or collection
                Session["NCIPLEX_NewOrUpdated"]  = "";
                Session["NCIPLEX_Race"]          = "";
                Session["NCIPLEX_Criteria"]      = "";


                ListCancerTypes.DataSource = KVPair.GetKVPair("sp_NCIPLex_getCancerTypes");
                ListCancerTypes.DataBind();
                ListSubjs.DataSource = KVPair.GetKVPair("sp_NCIPLex_getSubjects");
                ListSubjs.DataBind();
                ListProductFormat.DataSource = KVPair.GetKVPair("sp_NCIPLex_getProductFormats");
                ListProductFormat.DataBind();
                ListCollections.DataSource = KVPair.GetKVPair("sp_NCIPLex_getCollections");
                ListCollections.DataBind();
                ListProductUpdates.DataSource = KVPair.GetKVPair("sp_NCIPLex_getProductUpdates");
                ListProductUpdates.DataBind();
                ListLanguages.DataSource = KVPair.GetKVPair("sp_NCIPLex_getLanguages");
                ListLanguages.DataBind();
                ListAudience.DataSource = KVPair.GetKVPair("sp_NCIPLex_getAudience");
                ListAudience.DataBind();
                ListRace.DataSource = KVPair.GetKVPair("sp_NCIPLex_getRace");
                ListRace.DataBind();

                ////ListAnnouncements.DataSource = KVPair.GetKVPair("sp_NCIPL_getAnnouncements");
                ////ListAnnouncements.DataBind();
                //ListAnnouncements.DataSource = Announcement.GetAnnouncements();
                //ListAnnouncements.DataBind();
                //if (ListAnnouncements.Items.Count == 0)
                //    divAnnouncements.Visible = false;
                ////ListFeatures.DataSource = KVPair.GetKVPair("sp_NCIPL_getFeatures");
                ////ListFeatures.DataBind();
                //ProductCollection p = DAL.DAL.GetProductFeatures();
                //ListFeatures.DataSource = p;
                //ListFeatures.DataBind();
            }
            else //HITT 7426 - The else code is added to handle enter key pressed in the text box
            {
                //txtSearch.Text = Session["PUBENT_SearchKeyword"].ToString();
                Session["NCIPLEX_SearchKeyword"] = this.searchbar.Terms;

                Session["NCIPLEX_TypeOfCancer"]  = "";
                Session["NCIPLEX_Subject"]       = "";
                Session["NCIPLEX_Audience"]      = "";
                Session["NCIPLEX_Language"]      = "";
                Session["NCIPLEX_ProductFormat"] = "";
                Session["NCIPLEX_StartsWith"]    = "";
                Session["NCIPLEX_Series"]        = "";
                Session["NCIPLEX_NewOrUpdated"]  = "";
                Session["NCIPLEX_Race"]          = "";

                Session["NCIPLEX_Criteria"] = Session["NCIPLEX_SearchKeyword"];

                /*Begin CR-31 - HITT 9815 */
                GlobalUtils.Utils objUtils    = new GlobalUtils.Utils();
                string            QueryParams = objUtils.GetQueryStringParams();
                objUtils = null;
                /*End CR-31 - HITT 9815 */

                //CR-31 HITT 9815 Response.Redirect("searchres.aspx");
                Response.Redirect("searchres.aspx" + "?sid=" + QueryParams);
            }


            //Set the appropriate tab
            //int intTotalQty = 0;
            //if (Session["NCIPL_Qtys"] != null)
            //{
            //    string[] qtys = Session["NCIPL_Qtys"].ToString().Split(new Char[] { ',' });
            //    for (int i = 0; i < qtys.Length; i++)
            //    {
            //        if (qtys[i].Length > 0)
            //            intTotalQty += Int32.Parse(qtys[i].ToString());
            //    }
            //}

            //string litText1 = @"<li id=""selected""><a href=""home.aspx"">Home</a></li>";
            //string litText2 = @"<li><a href=""self.aspx"">Self-Printing Options</a></li>";
            //string litText3 = @"<li><a href=""cart.aspx"">" + "Shopping Cart (" + intTotalQty.ToString() + ") </a></li>";
            //Master.LiteralText = "<ul>" + litText1 + litText2 + litText3 + "</ul>";

            //Begin - Code for Appropriate Tabs
            GlobalUtils.Utils UtilMethod = new GlobalUtils.Utils();
            if (Session["NCIPLEX_Pubs"] != null)
            {
                Master.LiteralText = UtilMethod.GetTabHtmlMarkUp(Session["NCIPLEX_Qtys"].ToString(), "home");
            }
            else
            {
                Master.LiteralText = UtilMethod.GetTabHtmlMarkUp("", "home");
            }
            UtilMethod = null;
            //End Code for Tab
        }