I have an object data source that looks like this:
<asp:ObjectDataSource ID="obdsList" runat="server" EnablePaging="True" SelectCountMethod="GetCountByID" SortParameterName="sortExpression" OldValuesParameterFormatString="original_{0}" SelectMethod="GetByID" TypeName="Services.Users" onselected="obdsList_Selected"> <SelectParameters> <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" /> </SelectParameters> </asp:ObjectDataSource>
And an onselected event like this:
protected void obdsList_Selected(object sender, ObjectDataSourceStatusEventArgs e) { }
However, the event method is called twice .. once with my returned list and once with the returned number of Int32. If I want to pass e.ReturnValue to the return list, how can I distinguish between count and select methods? I can do e.ReturnValue.GetType().ToString() , but this seems like a hack.
itchi source share