/// Ticket 100006: [Topmedia] 3.1. Search – Product Finder
we keep the URL in the button.
<a class="btn btnProductFinderSearch" data_src=@Url.Action("SearchByProductFinderSelection", "ProductList")>@Sana.SimpleText("ProductFinderSearch", "Search")</a>
on js
set URL and parameters.
$(function () { $('.btnProductFinderSearch').click(function () { ... var actionUrl = $(".btnProductFinderSearch").attr('data_src'); var paramerters = "?type=" + selectedType + "&otherFilters=" + selectedVal; if (selectedVal != "") { // Sana.Urls.Home() var getUrl = actionUrl + paramerters; // ?type:SANAECOM_FILTER1:Apple,SANAECOM_FILTER4:ModelNR1&otherFilters:Series:3" //"ProductList/SearchByProductFinderSelection?" + "type" + selectedType "", otherFilters: selectedVal; // 'ProductFilter/SearchProduct' //window.location.href = getUrl; // data.RedirectUrl;
register in rought
protected override void RegisterSystemRoutes(SanaRouteCollection routes) { base.RegisterSystemRoutes(routes); /// Ticket 100006: [Topmedia] 3.1. Search – Product Finder routes.MapSystemPageRoute(Name, "SearchByProductFinderSelection", "SearchByProductFinderSelection"); routes.MapSystemPageRoute(Name, "Testmethodss", "Testmethodss"); }
set HttpGet method
[HttpGet] [ActionName("SearchByProductFinderSelection")] public virtual async Task<ActionResult> SearchByProductFinderSelection(string type, string otherFilters, [PageIndex] int page, int count = 0, SortOption sort = null, string viewMode = null) { ......................... ..