Not sure where the best place to ask this question is so I will ask it here. I am trying to use the LinqDataSource ASP.NET 3.5 control and am having a problem with using the Where attribute. I have a field that I want to filter on that is an Enumeration, however if I try to put the integer value in the Where attribute the page will not compile. How do I use enum values in the Where attribute?
I have something like this:
public enum EventType
Charger = 0,
Location = 1,
Scanner = 2
I want to filter the LinqDataSource like this:
<asp:LinqDataSource ID="DataSource1" runat="server"
Where="EventType = 2" />
This won't work. The EventType property is an instance of the enum type above.
View Complete Post