Problem with Masterpage/webparts

Discussion in 'ASP .Net' started by Herman verschooten, Dec 4, 2005.

  1. 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
    Herman verschooten, Dec 4, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    MasterPage -> Page -> MasterPage Code Access

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Apr 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,852
    Steven Cheng[MSFT]
    Apr 14, 2006
  2. ThunderMusic
    Replies:
    2
    Views:
    422
    Gregory Gadow
    Sep 27, 2006
  3. Randy Smith
    Replies:
    9
    Views:
    405
    Mark Rae
    Apr 14, 2007
  4. mr t
    Replies:
    0
    Views:
    381
  5. Torben Laursen
    Replies:
    4
    Views:
    560
    clintonG
    Mar 15, 2008
Loading...

Share This Page