title: Implementing filters for a SQL table display on a view in ASP.NET MVC (C#) and LINQ-to-SQL?
body: <p>A follow-up from <a href="https://stackoverflow.com/questions/488061/passing-multiple-parameters-to-controller-in-asp-net-mvc-also-generating-on-the/488127#488127">this question</a>, I've changed my controller and routing around so that now the sort value is assigned by ?sort= however I also want to implement the ability for users to filter the table based on a select set of values:</p>
  
  <p>Technician : Tech1, Tech2, Tech3, etc.
  Category : Category1, Category2, Category3, etc.
  Priority : Priority1, Priority2, Priority3, etc.</p>
  
  <p>I am only using one table at the moment, so the easiest way to get the list of available categories to filter on is to select distinct values of category from the table. They are all input via HTML s so I have control over what gets put in. I don't want to split them all into different tables just yet, I'm trying to do as much as I can with one table for now but if this is the scenario that breaks the one-table-model then fine, I can adjust.</p>
  
  <p>To clarify the use case it is probably best to show a quick screenshot of the view in question:</p>
  
  <p><a href="http://images.robburke.ie/stackoverflow/491563.png" rel="nofollow noreferrer">http://images.robburke.ie/stackoverflow/491563.png<br />
  Click to view full-size.</a></p>
  
  <p>I want to implement a system whereby a user could for example filter "Priority" to only show issues where priority was "Investigative.</p>
  
  <p>I'm looking for suggestions on how to implement this on both the front and back end. I've tried to find a site that does something similar with tables of data but I can't think of one of the top of my head although I'm sure this is a feature that has been implemented a hundred times before!</p>
  
  <p>Can anyone recommend a good way to do this?</p>