Zuhaib

A very lazy but meticulous blogger

[ObjectDataSource – MissingMethodException] Method not found: Void System.Web.UI.WebControls.Parameter.set_DbType (System.Data.DbType)

with 2 comments

I recently faced this annoying error while working on an ASP.NET site. The problem only occurred with pages containing ObjectDataSource that took parameters.

After a lot of head scratching, I finally stumbled upon this thread. The problem is with the Type property of the ObjectDataSource. Removing the type property from the ObjectDataSource parameters would solve the problem.

Also the error here is misleading set_DbType is a property and not a method.

Possible Related Posts:

  1. Writing Provider Independent .NET Data Access Code

Written by Zuhaib

February 24th, 2009 at 2:44 pm

2 Responses to '[ObjectDataSource – MissingMethodException] Method not found: Void System.Web.UI.WebControls.Parameter.set_DbType (System.Data.DbType)'

Subscribe to comments with RSS or TrackBack to '[ObjectDataSource – MissingMethodException] Method not found: Void System.Web.UI.WebControls.Parameter.set_DbType (System.Data.DbType)'.

  1. You must have .NET Framework 3.5 Installed first.
    Parameter in System.Web.dll in .NET Framework 2.0 doesn’t have a DbType Property.

    [ Reply ]

    Zuhaib Reply:

    You are correct. DbType property was added in .NET Framework 3.5

    [ Reply ]

    Regnad

    8 Mar 10 at 5:53 am

Leave a Reply