DataSourceID and MasterPages...
Posted on 2006-03-21
I have a strange issue that makes sense, but was very unexpected.
I have a master page with 2 content areas. I've got an ObjectDataSource1 object in the 1st of those content areas. I've also got databound controls in both areas that point at that single datasource. The problem is that when i run the app, any controls in the 2nd Content area gives me the following error:
The DataSourceID of 'FormView2' must be the ID of a control of type IDataSource. A control with ID 'ObjectDataSource1' could not be found.
FormView2 is the control in the 2nd content area. If I move the DataSource over to the 2nd content area, the error changes to:
The DataSourceID of 'FormView1' must be the ID of a control of type IDataSource. A control with ID 'ObjectDataSource1' could not be found.
It's like it can't see the datasource if it's not in the same "Content Area". I understand WHY this might be, but how am I expected to make this work? Do I really have to load all the data twice if I want to display it in two content areas?