ObjectDataSource and SelectMethod question

F

Froefel

I'm using ObjectDataSources to access my data, and while I gathered
very useful code from a variety of sources to get started, I keep
running into an issue.

First off, everything actually works, it's only an issue related to
the Visual Studio IDE indicating an error that isn't an error.
So here goes:
My ObjectDataSource looks as follows (stripped down):
<asp:ObjectDataSource
ID="SearchResultsDataSourceFiltered"
runat="server"
TypeName="CustomerConfigDAL"
SelectMethod="GetCustomerConfigs"
SelectCountMethod="GetCountOfCustomerConfigs" />

In the underlying CustomerConfigDAL, I have several flavors of the
GetCustomerConfigs() function, taking various parameters, like so:
public static List<CustomerConfig> GetCustomerConfigs(string
SortExpression)
public static List<CustomerConfig> GetCustomerConfigs(string
SortExpression, string critCustomerCode)
public static List<CustomerConfig> GetCustomerConfigs(string
SortExpression, CustomerConfigCriteria crit)

What happens is that the VS IDE underlines the statement
SelectMethod="GetCustomerConfigs" with a red wiggle, indicating an
"Ambiguous reference". It seems that at run-time the correct function
is being called, but at design-time the IDE cannot figure out what
function it needs.

Is there a way to disable this error? It's kind of annoying because,
using ReSharper, I get a red status whereas there's really nothing
wrong.

Any thoughts on this?

-- Hans
 

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

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top