SelectCountMethod using SelectParameters in 3.5

A

Aconquija

Hello,
I am having an issue with the SelectCountMethod of the ObjectDataSource
using .net framework 3.5. What I need to do is pass the following
SelectParameters to my SelectCountMethod in order to filter my result as they
are filtered in the SelectMethod:

<asp:QueryStringParameter QueryStringField="cat" Type="String"
ConvertEmptyStringToNull="true"
Name="Category" />
<asp:QueryStringParameter QueryStringField="brand"
Type="String" ConvertEmptyStringToNull="true"
Name="Brand" />

My ods is as follows:
<asp:ObjectDataSource ID="odsItems" runat="server"
SelectCountMethod="getItemsCount" SelectMethod="getItems" EnablePaging="true"
TypeName="PrivateStore">

My function is:
Public Function getItemsCount(ByVal Category As String, ByVal Brand As
String,) As Integer

I keep getting the following error:
ObjectDataSource 'odsItems' could not find a non-generic method
'getItemsCount' that has parameters: Category, Brand.

Has anything changed in 3.5 to prevent this from working, or am I
misunderstanding something? Thanks in advance...
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top