Wednesday, May 31, 2017 3:56:49 PM
System.InvalidOperationException: The type specified in the TypeName property of ObjectDataSource 'LoginHistoryDetails' could not be found.
at System.Web.UI.WebControls.ObjectDataSourceView.GetType(String typeName)
at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at System.Web.UI.WebControls.GridView.DataBind()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Exception of type 'System.Web.HttpUnhandledException' was thrown.

Re: Problem while binding the ObjectDataSource

The error simply means that your class that holds the SelectMethod can not be found. Make sure your ObjectDataSource is pointing to a valid class via the TypeName property. If the class is in a different namespace, make sure to prefix your class with the
proper namespace.

To create an instance of the object that the ObjectDataSource control binds to, the control uses reflection to load the type that is identified by the type name at run time. Therefore, the value of the
TypeName property can be a partially qualified type for code that is located in the Bin or App_Code directories or a fully qualified type name for code that is registered in the global assembly cache. If you use the global assembly cache, you must add
the appropriate reference to the assemblies section of the Machine.config or Web.config file.

Re: Problem while binding the ObjectDataSource

Hi maverick786us,
According to your error, you could check your code as the kaushlparik27 method. Also you can initialize TypeName property during Page_Init and not specifying TypeName directly in the ObjectDataSource. Code as below:

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.