<asp:LinqDataSource
ContextTypeName="ExampleDataContext"
TableName="Products"
Select="new(Key as ProductCategory,
Average(Price) as AvePrice)"
ID="LinqDataSource1"
runat="server">
</asp:LinqDataSource>
Somehow my Select in .aspx file (as seen above) is not working: all columns are returned in the query result. So I will try to do that in code behind.
How do I perform the selection of the 2 fields in my LinqDataSource1_Selecting ()? Thanks.