I have attached page here and want to do filter by click on "Find Car". On the click my page redirects to the next page of vehicles with those given filter result. But I am confused how would I redirect my page with these data in umbraco. Please help me out its urgent.
You can pass URL parameter values to your tracking destination URL and from there you can easily get the value of those parameters in your template or even in partial view or macro.
Thanks @Ronak panchal I have get those values on another page. Now I wan to comapre it with my query. But I was not able to pass it in this given below query. Please help me out.
@{
var Id = Request.RawUrl; //Gets value from url
var tempID = Id.Split('?').Last(); //splits unnecessary characters
string[] data = tempID.Split('&');
string maker = data[0].Split('=').Last();
string body = data[1].Split('=').Last();
string keyword = data[2].Split('=').Last();
var selection = Umbraco.Content(Guid.Parse("3758071d-10c8-4890-b680-64f43a7b4149"))
.Children("vehicles")
.Where(x => x.IsVisible())
.OrderByDescending(x => x.Id);
//var workcollection = selection.Where("");
}
Just debug that code and check what you got in a variable selection,
Probably you can search for the properties in for each item and make LINQ query to filter the list as you did for getting items in the selection.
The second way, you can make a new class and make a new method for filter those data according to parameters and return list( filtered ) and just traversing that returned filtered in view to display filtered result.
Filter Data send from one page to another
Hello Everyone,
I have attached page here and want to do filter by click on "Find Car". On the click my page redirects to the next page of vehicles with those given filter result. But I am confused how would I redirect my page with these data in umbraco. Please help me out its urgent.
Hello Prachi,
You can pass URL parameter values to your tracking destination URL and from there you can easily get the value of those parameters in your template or even in partial view or macro.
Hope this will help,
Ronak Panchal.
Thanks @Ronak panchal I have get those values on another page. Now I wan to comapre it with my query. But I was not able to pass it in this given below query. Please help me out.
Hello Prachi,
Just debug that code and check what you got in a variable selection,
Probably you can search for the properties in for each item and make LINQ query to filter the list as you did for getting items in the selection.
The second way, you can make a new class and make a new method for filter those data according to parameters and return list( filtered ) and just traversing that returned filtered in view to display filtered result.
Ronak.
is working on a reply...