This is seemingly easy task and yet I can't get this to worl so please give me your pointers. I have a SQL table that has one of its columns of DateTime type. I want to access it from ASP application via LinqDataSource. I want to provide WHERE parameter to LinqDataSourcefrom Calendarcontrol (that returns DateTime as SelectedDate). I want to display set in GridView. Seems easy, doesn't it? But regardless of what I do I get an error at runtime:
Operator '==' can not be applied to operands of type
DateTimeand Object which makes no sense to me because Calendar returnsDateTimeandLINQclass also returnsDateTimefor that column. How would you approach this task or this problem. I can't useSqlDataSourcebecause ofSQLserved andIISsecurity configuration that currently I do not want to touch.
Unfortunatelly it is impossible to perform this wiring declaratively. Instead load your query with filters into a List<>)_ and bind GridView to it in C# code.