title: ASP.NET Dynamic Data Add Additional Filter Criteria to Page
body: <p>How should I be adding additional search/filter criteria to a Dynamic Data Web Application?</p>
  
  <p>I created a Dynamic Data Web Application using the Northwind database and I am using a custom page for the Employees table (based on the ListDetails.aspx Page Template).  I would like to add additional search/filter/where parameters to the Page.  By default the where parameters collection is being dynamically created based on the FilterRepeater control, which is also being dynamically created based on the “foreign key” relationships the Employee Table has.</p>
  
  <p>In an attempt to add additional search criteria, I have tied in to the Selecting event of the GridView's LinqDataSource and am trying to add additional items to the WhereParameters collection of the LinqDataSourceSelectEventArgs.</p>
  
  <p>The problem is I can't specify what type of comparison needs to be performed.  The WhereParameters collection only accepts a String and an Object, but not how to compare them.  What I really would like to be able to do is add to a collection of predicate delegates...</p>
  
  <p>How should I be adding additional search criteria to this page?  Through attributes applied to the LINQ To SQL entity (if so, how)?  What if the criteria/criterion is not based on the entity itself, how would I add to the search criteria in that case?</p>
  
  <p><strong>Aaron Hoffman</strong></p>