Problem with Masterpage/webparts

  • Thread starter Herman verschooten
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top