ObjectDataSource working with objects

H

Hugo Flores

Hi,

Is it possible for the ObjectDataSource to work with a user created
object's properties.
To clear things up, here's the scenario

I have an object car, property make
Is there a way for my ObjectDataSource to pass the make of the car to
a function GetCarProperties(), through the ObjectDataSource
parameters?
Or does the parameters only work if they are passed to the function
GetCarProperties(make, model, etc)

Thanks
 
M

MattC

Something like this:

ASPX
<asp:ObjectDataSource runat="server" ID="FullCategoryList"
TypeName="NameSpace.App_Code.CategoryDataMapper"
SelectMethod="GetCategories"
DataObjectTypeName="NameSpace.App_Code.Category ></asp:ObjectDataSource>

NameSpace.App_Code.CategoryDataMapper
{
public static List<Category> GetCategories(){..}
public static void UpdateCategory(Category c){...}
}

MattC
 

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

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top