ObjectDataSource working with objects

  • Thread starter Thread starter Hugo Flores
  • Start date Start date
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
 
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
 
Back
Top