473,748 Members | 2,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 ObjectDataSourc e. 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 ObjectDatasourc e 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.Mast er

inside mainmaster: Table with 3 columns, column 1 login control, column 2
contentplacehol der, column 3 static images.

inside Content: WebPartManager , WebPartZone, CustomerList (GridView) wich
Uses CustomerDataSou rce (objectDataSour ce), DocList (GridView) wich uses
DocumentDataSou rce (objectDataSour ce) and OfferList (GridView) wich uses
OfferDataSource (objectDataSour ce).

Not Working:

members/Default.aspx uses Member.Master

inside membermaster: same table with 3 columns, only column 3 contains
WebPartZone with CustomWebContro l and before the table has been added the
WebPartManager

inside content: Same as before but without the WebPartManager

Gives ERROR : CustomerList contains DataSourceID CustomerDataSou rce which
does not exist.
Sincerely,

Herman
Dec 4 '05 #1
0 1084

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2275
by: Barbara Alderton | last post by:
I am working with SharePoint 2003. I am using (using C#) an existing webpart as a child control (server control). I need to access/manipulate the HTML that the control outputs prior to rendering it to the the page. The control outputs a list in a one-column table format. I need to access the contents of the rows and output them with restrictions in my own table format. Does anyone have any examples of manipulating the HTML of a server...
0
1422
by: Alan Silver | last post by:
Hello, Sorry for the long post, but I want to try and explain it clearly... I'm using webparts for (possibly) an unusual scenario, and I'm having problems. This could be because I'm doing something they weren't designed for, or it could just be that I don't understand what's going on well enough to get it to work. The situation is that I have a page that displays products from a
0
1125
by: Sangeetha | last post by:
Hello All, I have a web application called Remoter and the application resides in this path 'D:\InetPub\websites\dev1\Remoter'. Now if I access the application(that is homepage default.asp in D:\InetPub\websites\dev1\Remoter), it fails. Inside default.asp, I have used Server.Execute(displayURL) where displayURL = " \WebParts\HTMLEditor\HTMLDisplay.asp". Now this Server.Execute fails. If I do a Server.MapPath(displayURL) to check if it is...
0
1102
by: Adam Tibi | last post by:
Hello, I have this: MasterPage 1: <asp:ContentPlaceHolder ID="cphHead" runat="server"> </asp:ContentPlaceHolder> Some Html... <asp:ContentPlaceHolder ID="cphBody1" runat="server"> </asp:ContentPlaceHolder>
35
3228
by: Chris | last post by:
Hi, I tried to create a class which must change the propety 'visible' of a <linktag in the masterpage into 'false' when the user is logged. But i get the error: "Object reference not set to an instance of an object" for the line 'If mpg.FindControl("lkred").Visible = True Then'. I couldn't find sofar the solution. Any help would be appreciated ... Thanks
0
2119
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the nant file which is causing the problem, the object code that is not being built and the error message which is being produced. The weird thing is that VS.net builds without a problem. And the intellisense within the object WorkQueue knows that...
3
2164
by: clintonG | last post by:
Why don't we see more WebParts being used on the web? SharePoint gets all the fun? And what are the prevailing opinions be they what they may about the use of WebParts rather than WPF when the context would be the development of a service which enables users to select templates that have pre-established zones which function as content containers on a web page? PopFly has a "build a web page" service for example. I need something similar...
6
1040
by: MissElegant | last post by:
Hi my Friends, I dont know what is the problem in my code, Could somebody help me please?? === this is the page: === <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.