TypeName property of ObjectDataSource Not Found


B

Bryce Fischer

I've got a simple (I think) asp.net application.

I've created a DataSet in App_Code/ItemDataSet.xsd. Tested connection,
seemed to work fine.

In my ASPX file, I first dropped an ObjectDataSource onto the form, and
pointed it to the dataset created above.

I then dropped a GridView on the form, and selected the ObjectDataSource
I created above. In the Design view it seems to be at least loading the
columns (if not the data) correctly.

When I try to access on the server, I am getting the following error
(full stack trace at bottom of message):

[InvalidOperationException: The type specified in the TypeName property
of ObjectDataSource 'ObjectDataSource1' could not be found.]

Thanks for any insight.

here is my aspx code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="admin_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Moloney Store</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete"
InsertMethod="Insert"
OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="ItemDataSetTableAdapters.STORE2_ITEMTableAdapter"
UpdateMethod="Update">
<DeleteParameters>
<asp:parameter Name="Original_id" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:parameter Name="host_id" Type="Int32" />
<asp:parameter Name="sku" Type="String" />
<asp:parameter Name="name" Type="String" />
<asp:parameter Name="price" Type="Decimal" />
<asp:parameter Name="description" Type="String" />
<asp:parameter Name="featured" Type="Boolean" />
<asp:parameter Name="popularity" Type="Int32" />
<asp:parameter Name="taxRate" Type="Decimal" />
<asp:parameter Name="Original_id" Type="Int32" />
<asp:parameter Name="id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:parameter Name="host_id" Type="Int32" />
<asp:parameter Name="sku" Type="String" />
<asp:parameter Name="name" Type="String" />
<asp:parameter Name="price" Type="Decimal" />
<asp:parameter Name="description" Type="String" />
<asp:parameter Name="featured" Type="Boolean" />
<asp:parameter Name="popularity" Type="Int32" />
<asp:parameter Name="taxRate" Type="Decimal" />
</InsertParameters>
</asp:ObjectDataSource>
&nbsp;&nbsp;<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="False"
DataKeyNames="id" DataSourceID="ObjectDataSource1">
<Columns>
<asp:BoundField DataField="id" HeaderText="id"
InsertVisible="False" ReadOnly="True"
SortExpression="id" />
<asp:BoundField DataField="host_id"
HeaderText="host_id" SortExpression="host_id" />
<asp:BoundField DataField="sku" HeaderText="sku"
SortExpression="sku" />
<asp:BoundField DataField="name" HeaderText="name"
SortExpression="name" />
<asp:BoundField DataField="price" HeaderText="price"
SortExpression="price" />
<asp:BoundField DataField="description"
HeaderText="description" SortExpression="description" />
<asp:CheckBoxField DataField="featured"
HeaderText="featured" SortExpression="featured" />
<asp:BoundField DataField="popularity"
HeaderText="popularity" SortExpression="popularity" />
<asp:BoundField DataField="taxRate"
HeaderText="taxRate" SortExpression="taxRate" />
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>


and the full text of the stack trace:
[InvalidOperationException: The type specified in the TypeName property
of ObjectDataSource 'ObjectDataSource1' could not be found.]
System.Web.UI.WebControls.ObjectDataSourceView.GetType(String
typeName) +1261639

System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments
arguments) +1936
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments
arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82

System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
+69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210
 
Ad

Advertisements


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

Top