private void SearchExecute() { try { if (this.ResultsTabId != int.MinValue) { if (DotNetNuke.Entities.Host.HostSettings.GetHostSetting("UseFriendlyUrls") == "Y") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.ResultsTabId) + "?xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } else { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.ResultsTabId) + "&xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } } else if (this.ResultsTabName != "") { SearchInputController oController = new SearchInputController(); ArrayList oResults = oController.GetSearchResultModules(this.PortalSettings.PortalId); foreach (XSSearchInputInfo oResult in oResults) { if (oResult.SearchTabName.Trim().ToLower() == this.ResultsTabName.Trim().ToLower()) { if (DotNetNuke.Entities.Host.HostSettings.GetHostSetting("UseFriendlyUrls") == "Y") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(oResult.TabID) + "?xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } else { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(oResult.TabID) + "&xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } } } } else { if (FilterStrings(txtSearch.Text) != "") { //if it gets here it is because the parameter was not set in the skin Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.PortalSettings.ActiveTab.TabID, "OpenSearchResults", new string[] { "xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text)) })); } } } catch { //do nothing } }
private void SearchExecute() { try { if (this.ResultsTabId != int.MinValue) { if (DotNetNuke.Entities.Host.HostSettings.GetHostSetting("UseFriendlyUrls") == "Y") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.ResultsTabId) + "?xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } else { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.ResultsTabId) + "&xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } } else if (this.ResultsTabName != "") { SearchInputController oController = new SearchInputController(); ArrayList oResults = oController.GetSearchResultModules(this.PortalSettings.PortalId); foreach(XSSearchInputInfo oResult in oResults) { if (oResult.SearchTabName.Trim().ToLower() == this.ResultsTabName.Trim().ToLower()) { if (DotNetNuke.Entities.Host.HostSettings.GetHostSetting("UseFriendlyUrls") == "Y") { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(oResult.TabID) + "?xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } else { Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(oResult.TabID) + "&xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))); } } } } else { if (FilterStrings(txtSearch.Text) != "") { //if it gets here it is because the parameter was not set in the skin Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.PortalSettings.ActiveTab.TabID, "OpenSearchResults", new string[]{"xsq=" + Server.UrlEncode(FilterStrings(txtSearch.Text))})); } } } catch { //do nothing } }