B
Bill Nicholson
A page has 2 Content Controls. One Object Data Source is in one of
those Content Controls. There are Data Controls in both Content
Controls that can use the Object Data Source. At design time, VS 2005
will let you assign the Object Data Source to both of the Data
Controls. However, at runtime, the app Yellow Screens because the
Object Data Source cannot be resolved unless it's in the same Content
Control as the Data Control.
"The DataSourceID of 'GridViewSample' must be the ID of a control of
type IDataSource. A control with ID 'ObjectDataSourceSample' could
not be found."
Also, you can't have a Object Data Source control with the same name
in two different Content Controls. VS 2005 prevents that.
Therefore you end up with the exact same identical Object Data Source
in two places in the aspx code, each with a different name. A
maintenance nightmare.
Am I missing something? Is there a better way to do this?
Thanks,
Bill
Cincinnati, OH USA
those Content Controls. There are Data Controls in both Content
Controls that can use the Object Data Source. At design time, VS 2005
will let you assign the Object Data Source to both of the Data
Controls. However, at runtime, the app Yellow Screens because the
Object Data Source cannot be resolved unless it's in the same Content
Control as the Data Control.
"The DataSourceID of 'GridViewSample' must be the ID of a control of
type IDataSource. A control with ID 'ObjectDataSourceSample' could
not be found."
Also, you can't have a Object Data Source control with the same name
in two different Content Controls. VS 2005 prevents that.
Therefore you end up with the exact same identical Object Data Source
in two places in the aspx code, each with a different name. A
maintenance nightmare.
Am I missing something? Is there a better way to do this?
Thanks,
Bill
Cincinnati, OH USA