0

I have a list of Assets displayed in a HTML table, the data model for these is quite complicated; they each have a Manufacturer/Model pair, Location and Status just to name a few.

To filter by one field, it is simple something along the lines of

@Html.ActionLink(item.LocationName, "Index",
new { LocationID = item.LocationID.ToString() }, null)

This will produce a URL looking like

hxxp://Localhost/Assets/Index?LocationID=3

The problem arises when trying to filter by both multiple different fields and multiple similar fields, I cannot seem to find a way to produce URLs like

hxxp://Localhost/Assets/Index?LocationID=3,4

or

hxxp://Localhost/Assets/Index?LocationID=3&Status=Active

I may just be trying to treat MVC like Webforms but I don't see any way of passing all these combinations of filtered fields back to my controller to produce a table that shows the data the end user wants to see.

4

1 回答 1

0

您也可以尝试 Sprint.Filter

于 2013-06-04T14:34:16.763 回答