private void SearchData(string SearchKey) { try { //Now Send to The Result Page; string strURL = string.Empty; SageFrameConfig pagebase = new SageFrameConfig(); bool IsUseFriendlyUrls = pagebase.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls); SearchKey = Server.HtmlEncode(SearchKey); SageFrameSearch objSearch = new SageFrameSearch(); if (objSearch.SearchPageExists(GetPortalID, Path.GetFileNameWithoutExtension(SageSearchResultPage))) { if (IsUseFriendlyUrls) { if (GetPortalID > 1) { strURL = ResolveUrl("~/portal/" + GetPortalSEOName + "/" + SageSearchResultPage + "?searchword=" + SearchKey); } else { strURL = ResolveUrl("~/" + SageSearchResultPage + "?searchword=" + SearchKey); } } else { if (SageSearchResultPage.Contains(SageFrameSettingKeys.PageExtension)) { SageSearchResultPage = SageSearchResultPage.Replace(SageFrameSettingKeys.PageExtension, ""); } strURL = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=" + SageSearchResultPage + "&searchword=" + SearchKey); } } else { if (IsUseFriendlyUrls) { if (GetPortalID > 1) { strURL = ResolveUrl("~/sf/portal/" + GetPortalSEOName + "/Search-Result" + SageFrameSettingKeys.PageExtension + "?searchword=" + SearchKey); } else { strURL = ResolveUrl("~/sf/Search-Result" + SageFrameSettingKeys.PageExtension + "?searchword=" + SearchKey); } } else { if (SageSearchResultPage.Contains(SageFrameSettingKeys.PageExtension)) { SageSearchResultPage = SageSearchResultPage.Replace(SageFrameSettingKeys.PageExtension, ""); } strURL = ResolveUrl("~/Default.aspx?ptlid=" + GetPortalID + "&ptSEO=" + GetPortalSEOName + "&pgnm=Search-Result" + SageFrameSettingKeys.PageExtension + "&searchword=" + SearchKey); } } Session["SageDtv"] = null; Response.Redirect(strURL, false); } catch (Exception ex) { ProcessException(ex); } }
private void SearchData(string SearchKey) { try { //Now Send to The Result Page; string strURL = string.Empty; SearchKey = Server.HtmlEncode(SearchKey); SageFrameSearch objSearch = new SageFrameSearch(); if (objSearch.SearchPageExists(GetPortalID, Path.GetFileNameWithoutExtension(SageSearchResultPage))) { if (!IsParent) { strURL = GetParentURL + "/portal/" + GetPortalSEOName + "/" + SageSearchResultPage + "?searchword=" + SearchKey; } else { strURL = GetParentURL + "/" + SageSearchResultPage + "?searchword=" + SearchKey; } } else { if (!IsParent) { strURL = GetParentURL + "/sf/portal/" + GetPortalSEOName + "/Search-Result" + SageFrameSettingKeys.PageExtension + "?searchword=" + SearchKey; } else { strURL = GetParentURL + "/sf/Search-Result" + SageFrameSettingKeys.PageExtension + "?searchword=" + SearchKey; } } Session["SageDtv"] = null; Response.Redirect(strURL, false); } catch (Exception ex) { ProcessException(ex); } }