473,666 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Objectdatasourc e and project less solution.

Hello,

I have a project less solution asp.net 2.0 with c#. I have a method in
page code behind which returns a datatable, that method I want to
assign in the objectdatasourc e select method, but when ever I am
passing the typename in objectdatasourc e with the class name its
saying couldn't find the type. but if the solution is not projectless
same code is working fine, is there anything extra need to be done on
the page or objectdatasourc e.
Cheers,
PB
Jun 27 '08 #1
1 997
On Apr 30, 9:40*am, Prasanta <prasanta.bhow. ..@gmail.comwro te:
Hello,

I have a project less solution asp.net 2.0 with c#. I have a method in
page code behind which returns a datatable, that method I want to
assign in the objectdatasourc e select method, but when ever I am
passing the typename in objectdatasourc e with the class name its
saying couldn't find the type. but if the solution is not projectless
same code is working fine, is there anything extra need to be done on
the page or objectdatasourc e.

Cheers,
PB
Really the code for the ObjectDataSourc e select, update, delete,
insert methods should be contained in a separate class file in the
App_Code folder. When the ObjectDataSourc e executes these methods it
creates an instance of the class. If the code for these methods is
within the page code-behind then merely assigning the method names to
the ObjectDataSourc e will not work because it will expect a class name
reference.

You don't need a host project to do this. It works perfectly well
within a single web-site in the solution.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2643
by: avezina | last post by:
We would like to use those new cool features of Asp.Net 2.0 like the ObjectDataSource in our project. I tried few basics examples and its work well. Let's say I have a page that displays a detail of a product. On my page I have a product name and a short description. So I declare an ObjectDataSource in my page <asp:ObjectDataSource ID="productData" runat="server" SelectMethod="GetProduct"
2
2215
by: Kjetil Klaussen | last post by:
Hi, I’m having some troubles trying to bind my dataset to a GridView control through an ObjectDataSource control. The binding works fine for regular columns in my dataset, but I can’t seem to get my expression columns to show up in my GridView. Anybody knows any neat tricks to make this work? Here’s a “step-by-step” to reproduce my worries: 1. Create a new “ASP.NET web site” project
0
1079
by: Herman verschooten | last post by:
Hi, I am creating my first real ASP.NET 2.0 site and want to use the some of the new features. I created a masterpage with my main layout and added several contentpages, no problem so far. I added a members-only section where I want to use a second masterpage, and am now having trouble. My member-startpage contains: A WebPartManager and 1 WebPartzone, with 3 gridviews each connected to a
7
3451
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function 'UpdateRegistrant' expects parameter '@EMail', which was not supplied. The field value was null in the database and not changed in the FormView so is null going back into the stored procedure. I'm stumped and would greatly appreciate any suggestions.
1
2490
by: Scott F K Hooper | last post by:
VB.NET 2.0 project... I have an Access database with a table that has one primary key. I have used the Add TableAdapter wizard in VS2005 to create my TableAdapter. Next I added an ObjectDataSource object to a new aspx form, chosen the newly created TableAdapter and selected the parameterised Update command from the drop list provided. Finally I added a GridView control and bound it to the ODS. The problem I have is an error I get when...
10
4566
by: J055 | last post by:
Hi I've been trying out SqlCacheDependency using the ObjectDataSource and SQL Server 2005. It all works quite well with the minimum of configuration, e.g. <asp:ObjectDataSource ID="odsAccounts" runat="server" ... EnableCaching="true" SqlCacheDependency="CommandNotification"> .... </asp:ObjectDataSource>
0
1422
by: Angel | last post by:
I created a Dataset Type on one project which generates a DLL. I have a web project . I created a webpage with a gridview. I attached an ObjectDatasource to the Dataset type from my other project. I assigned the Insert, Update, and select to the ObjectDataSource. I attached the gridview control to the ObjectDataSource. I run it and edit a record in the grid. When I hit the update, I get the following error: ...
2
6775
by: Olivier Matrot | last post by:
Hello, I'm using a gridview with objectdatasource and custom objects collections SELECT/INSERT/UPDATE/DELETE methods are using custom objects as parameters. This is working fine. But I have a problem with the object that is passed back to the update method. It contains some of the properties of the original object sent during the SELECT method, but is missing others ! How can I ensure that all original object properties not modified are...
0
874
by: Prasanta | last post by:
Hello, I have a project less solution asp.net 2.0 with c#. I have a method in page code behind which returns a datatable, that method I want to assign in the objectdatasource select method, but when ever I am passing the typename in objectdatasource with the class name its saying couldn't find the type. but if the solution is not projectless same code is working fine, is there anything extra need to be done on the page or...
0
8448
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.