October 2010
Intermediate to advanced
1920 pages
73h 55m
English
ObjectCreating EventBy default, the ObjectDataSource control can represent only components that have a constructor that does not require any parameters. If you are forced to use a component that does require parameters for its constructor, you can handle the ObjectDataSource control’s ObjectCreating event.
For example, the component in Listing 18.36 must be initialized with a movie category parameter. The component returns only movies in the specified category.
Listing 18.36. MoviesByCategory.cs


The page in Listing 18.37 contains ...
Read now
Unlock full access