Getting "Incorrect parameter type" error on ObjectDataSource

When creating ASPX pages (.NET 4.0), or when running solution-wide analysis, Resharper incorrectly

points out "Incorrect parameter type" errors on ObjectDataSource markup (usually the Select

Method property).

The issue seems to be when using the parameter type of "Object", where the SelectMethod actually receives an array of objects.

    object[] filterParams

    <asp:ControlParameter Name="filterParams" Type="Object" ControlID="GridFilter1" PropertyName="FilterParameters" />

Are there plans to change this error, or is there some solution short of turning this error off?  The ControlParameter control does not support a Type of object[], but it works as expected in the applicationm and object is a base class of EVERYTHING.

Please advise,


Comment actions Permalink

Does it work if you remove the Type="Object" attribute from the ControlParameter tag?

Comment actions Permalink

Yes, it does.  Interesting!

Not marking this as "answered" just yet, in case there is a call for a change to the Resharper tool.

Much thanks,



Please sign in to leave a comment.