470,631 Members | 1,513 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,631 developers. It's quick & easy.

Problem with Masterpage/webparts

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
Dec 4 '05 #1
0 993

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Barbara Alderton | last post: by
reply views Thread by Alan Silver | last post: by
reply views Thread by Sangeetha | last post: by
reply views Thread by Adam Tibi | last post: by
reply views Thread by james.mcdonagh | last post: by
3 posts views Thread by clintonG | last post: by
6 posts views Thread by MissElegant | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.