protected override void RetrieveSearchAndBindGrid() { AssetTypeFileExtensionFinder finder = SavedSearch.Finder; AssetTypeDropDownList1.SafeSelectValue(finder.AssetTypeId); DataControl.SortExpression = SavedSearch.SortExpression; DataControl.SortAscending = SavedSearch.SortAscending; int page = SavedSearch.Page; PerformSearchAndBindGrid(finder, page); }
protected void Page_Load(object sender, EventArgs e) { SiteUtils.TieButton(KeywordsTextBox, SearchButton1); if (SavedUserAssetSearch == null || SavedUserAssetSearch.AssetFinder == null) { SavedUserAssetSearch = new SavedUserAssetSearch(); } AssetFinder finder = SavedUserAssetSearch.AssetFinder; if (!Page.IsPostBack) { string path = VirtualPathUtility.ToAppRelative(Request.Url.AbsolutePath).ToLower(); if (path.StartsWith("~/searchresults.aspx")) { // If browse option is selected if (Request.QueryString["showCategories"] != null) { SavedUserAssetSearch.CategoriesOpen = true; SavedUserAssetSearch.FilterOpen = false; } // Setup UI KeywordsTextBox.Text = finder.GeneralKeyword; BrandDropDownList1.SafeSelectValue(finder.BrandId); AssetTypeDropDownList1.SafeSelectValue(finder.AssetTypeId); // Only open the filter and populate the dropdowns if the filter is open if (SavedUserAssetSearch.CategoriesOpen || SavedUserAssetSearch.FilterOpen || WebUtils.GetIntRequestParam("openfilter", 0) == 1) { ToggleSearchVisibility(SavedUserAssetSearch.FilterOpen, SavedUserAssetSearch.CategoriesOpen); } } CategoryId = SavedUserAssetSearch.CurrentCategoryId; } SetupCategories(); }