H
Herman verschooten
Hi,
I am creating my first real ASP.NET 2.0 site and want to use the some of the
new features. I created a masterpage with my main layout and added several
contentpages, no problem so far.
I added a members-only section where I want to use a second masterpage, and
am now having trouble. My member-startpage contains:
A WebPartManager and 1 WebPartzone, with 3 gridviews each connected to a
different ObjectDataSource. It works perfect with my main masterpage.
My second masterpage contains a web usercontrol (which inherits from
IWebPart), a WebPartManager and also a WebPartZone.
I first noticed that my page crashed because you can have only 1
WebPartManager. So I removed the webpartmanager from my member-startpage,
thinking this would solve my problem.
I did NOT! In fact it creates a completely different and weird error, it
now will not find the ObjectDatasource for the first Gridview anymore. Even
though the Page_Load for this page does recognise it.
If I switch back to my main masterpage and re-add the WebPartManager,
everything is working again.
Anybody experienced something like this? And do you know a solution?
Working Scenario:
members/Default.aspx uses MainMaster.Master
inside mainmaster: Table with 3 columns, column 1 login control, column 2
contentplaceholder, column 3 static images.
inside Content: WebPartManager , WebPartZone, CustomerList (GridView) wich
Uses CustomerDataSource (objectDataSource), DocList (GridView) wich uses
DocumentDataSource (objectDataSource) and OfferList (GridView) wich uses
OfferDataSource (objectDataSource).
Not Working:
members/Default.aspx uses Member.Master
inside membermaster: same table with 3 columns, only column 3 contains
WebPartZone with CustomWebControl and before the table has been added the
WebPartManager
inside content: Same as before but without the WebPartManager
Gives ERROR : CustomerList contains DataSourceID CustomerDataSource which
does not exist.
Sincerely,
Herman
I am creating my first real ASP.NET 2.0 site and want to use the some of the
new features. I created a masterpage with my main layout and added several
contentpages, no problem so far.
I added a members-only section where I want to use a second masterpage, and
am now having trouble. My member-startpage contains:
A WebPartManager and 1 WebPartzone, with 3 gridviews each connected to a
different ObjectDataSource. It works perfect with my main masterpage.
My second masterpage contains a web usercontrol (which inherits from
IWebPart), a WebPartManager and also a WebPartZone.
I first noticed that my page crashed because you can have only 1
WebPartManager. So I removed the webpartmanager from my member-startpage,
thinking this would solve my problem.
I did NOT! In fact it creates a completely different and weird error, it
now will not find the ObjectDatasource for the first Gridview anymore. Even
though the Page_Load for this page does recognise it.
If I switch back to my main masterpage and re-add the WebPartManager,
everything is working again.
Anybody experienced something like this? And do you know a solution?
Working Scenario:
members/Default.aspx uses MainMaster.Master
inside mainmaster: Table with 3 columns, column 1 login control, column 2
contentplaceholder, column 3 static images.
inside Content: WebPartManager , WebPartZone, CustomerList (GridView) wich
Uses CustomerDataSource (objectDataSource), DocList (GridView) wich uses
DocumentDataSource (objectDataSource) and OfferList (GridView) wich uses
OfferDataSource (objectDataSource).
Not Working:
members/Default.aspx uses Member.Master
inside membermaster: same table with 3 columns, only column 3 contains
WebPartZone with CustomWebControl and before the table has been added the
WebPartManager
inside content: Same as before but without the WebPartManager
Gives ERROR : CustomerList contains DataSourceID CustomerDataSource which
does not exist.
Sincerely,
Herman