private void SetupInternalSearch() { if (SiteUtils.ShowAlternateSearchIfConfigured()) { string bingApiId = SiteUtils.GetBingApiId(); string googleCustomSearchId = SiteUtils.GetGoogleCustomSearchId(); if ((bingApiId.Length > 0) || (googleCustomSearchId.Length > 0)) { spnAltSearchLinks.Visible = true; } lnkBingSearch.Visible = (bingApiId.Length > 0); lnkGoogleSearch.Visible = (googleCustomSearchId.Length > 0); } // got here by a cross page postback from another page if Page.PreviousPage is not null // this occurs when the search input is used in the skin rather than the search link if (Page.PreviousPage != null) { HandleCrossPagePost(); } else { DoSearch(); } txtSearchInput.Focus(); }
private void SetupInternalSearch() { SetupScript(); ShowNoResults(); if (SiteUtils.ShowAlternateSearchIfConfigured()) { string bingApiId = SiteUtils.GetBingApiId(); string googleCustomSearchId = SiteUtils.GetGoogleCustomSearchId(); if ((bingApiId.Length > 0) || (googleCustomSearchId.Length > 0)) { spnAltSearchLinks.Visible = true; } lnkBingSearch.Visible = (bingApiId.Length > 0); lnkGoogleSearch.Visible = (googleCustomSearchId.Length > 0); } if ((!WebConfigSettings.DisableSearchFeatureFilters) && (displaySettings.ShowFeatureFilter)) { if (!Page.IsPostBack) { BindFeatureList(); ddFeatureList.Items.Insert(0, new ListItem(Resource.SearchAllContentItem, Guid.Empty.ToString())); if (ddFeatureList.Items.Count > 0) { ListItem item = ddFeatureList.Items.FindByValue(featureGuid.ToString()); if (item != null) { ddFeatureList.ClearSelection(); item.Selected = true; } } else { ddFeatureList.Visible = false; } } } else { ddFeatureList.Visible = false; } //got here by a cross page postback from another page if Page.PreviousPage is not null // this occurs when the seach input is used in the skin rather than the search link if (Page.PreviousPage != null) { HandleCrossPagePost(); } else { DoSearch(); } txtSearchInput.Focus(); }
private void LoadSettings() { bingAccountKey = SiteUtils.GetBingApiId(); searchDomain = SiteUtils.GetSearchDomain(); pageSize = WebConfigSettings.BingSearchPageSize; // don't touch the textbox on postback, we want what the user entered if (Page.IsPostBack) { return; } if (Request.QueryString.Get("q") == null) { return; } queryText = Request.QueryString.Get("q"); if (queryText.Length > 0) { txtSearch.Text = SecurityHelper.SanitizeHtml(queryText); } }
private void LoadSettings() { bingApiId = SiteUtils.GetBingApiId(); AddClassToBody("bingsearch"); }