HELP..... Master Page Error (The page has controls that require a Master Page, but none is specified.)

Hi,

I had almost finished creting my master page to use as a template for all future internal applications.  I had created a template to use in creatign new applications and had sucessfully created a new project based upon the MasterPage template...

All was working well when I noticed a small graphic inconsistancy on the MasterPage... I reopened the MasterPage and I got teh above error message... I have looked at the HTML and everything seems to be okay and there including the header lines...

<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<%
@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%
@ Register src="Common/Footer.ascx" tagname="Footer" tagprefix="uc1" %>

A can no longer view the page in the designer without this error... what has happened?


Thanks
Phillip J.
0
Phillip
10/30/2008 9:00:59 PM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

1 Replies
3287 Views

Similar Articles

[PageSpeed] 34

Hi, sniplet below I copied from this tutorial

Whether the MasterPageFile property is set via the @Page directive or programmatically is inconsequential to the end user's experience. However, the MasterPageFile attribute in the @Page directive is used by Visual Studio during design-time to produce the WYSIWYG view in the Designer. If you return to Default.aspx in Visual Studio and navigate to the Designer you'll see the message, "Master Page error: The page has controls that require a Master Page reference, but none is specified" (see Figure 2).

In short, you need to leave the MasterPageFile attribute in the @Page directive to enjoy a rich design-time experience in Visual Studio.


Hope this helps !
Rinze Cats

---------
please select 'mark as answer' if this post helped you!
0
Rinze
10/30/2008 9:08:34 PM
Reply:

Similar Artilces:

Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.   Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :) Hi Joeri Pansaerts, I am receiving the same error as the one posted her...

ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have:  I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...

Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error? The solutions I have seen either don't apply or don't work.  Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %> <%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %> <%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...

Problem Accessing Page Controls in a page that has a master page.
Hi,  I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).  The controls structure is..                                 MasterPage  >  PlaceHolder > MyPage.aspx &n...

Using controls from pages, master pages, and user controls
How would I structure my site in this scenario: I'd like to use a dropdownlist all over my site, sometimes in a regular page, sometimes in a master page, and sometimes in a user control.  I wish to bind its events programmatically, so normally I would just put that in the codebehind.  However, I notice a lot of code duplication because I have to declare the control in everywhere, in my base page (which all my pages inherit from), in my base master page (which all my master pages inherit from) and in my base user control (which all my user controls inherit from).How should I be...

The Master Page file is not valid. Attach a different Master Page, or correct the problem in the specified Master Page.
 Hi all,I've created a site with a couple of nested Master Pages. Site runs and compiles without error. I need to get it set up in Expressions now so that the non-technical content creators are able to edit it but when I try to attach a Master Page to a newly created file, it just hangs with 'Loading Master Page...'. If I subsequently detach the Master Page, it shows the error: The Master Page file 'http://localhost/layout/images/masterpages/SectionInnerPageChild.Master' is not valid. Attach a different Master Page, or correct the problem in the specified Master Page...

Master Control
I find Master Page idea brilliante. But wouldn't it be nice to have an ability to assign master layout for user controls? Does anyone know of something like that? Look into Themes and Skins. Skins are user to set a template for a contol.Themes and SkinsThemes and Skins 2 www.hopeasp.net Hmm Sean, themes and skins will only help with STYLING the components not layout. What I need is something to set the LAYOUT of the user control and use that master layout to place components in. Like in master page but in user controls.Simple example: Master Control fileUsercontrol layout st...

Help: disable user control in the master page for some pages
Hello all,Could anyone please help me to see what could I do? The issue I have is the following: I use VS 2005 to create a web site. I have an user control (ucSearch) placed in a contentplaceholder(Content3) in the master page. This user control has a search button to trigger an event. The event is captured by the master page, and then the master page launches a second event to refresh the content page (in contentplaceholder (Content4)). All functions well, except for the pages I have the validation controls or Captcha controls. Those controls would block...

Error rendering control in master page and aspx pages
I am using AjaxControlToolkit 3.5 for framework 3.5. I created a usercontrol that contains an animationExtender and it looks fine in design view. I added this user control inside anotehr user control and no problem in design new. When I add the second user control to a master page or aspx page, it gives me "Error Rendering Control" during design view. The message is: Error Rendering Control - ctl nameAn unhandled exception has occured.Unknown server tag'asp:AnimationExtender'. Any ideas how I can get rid of this annonying message? It works fine during runtime. Hi...

cannot view controls in mastre page and other pages with master page vwd 2008
I have written web application in visual web developer 2005. when I open this application in V W D 2008 I cannot view controls in master page. when open Masterpage and click on desgin it display images , tree, lables  and etc. then disappeared   same thing happend for pages with master page. why this is happening. in source code some cssclass are underlined says class or css value not defined. Does this the origin of the problem   It is difficult to say without seeing page markup. Can you post page HTML here?Thanks--------------------------------------------------...

CS0012 when referencing controls on master page's master page.
 I'm working with a content page that has a master page (we'll call it ChildMaster). ChildMaster also has a master page (ParentMaster). There is a control on ParentMaster I need to access from the content page. The code looks like this:  ControlType controlInstance = (ControlType) Master.Master.FindControl("controlID");  When I upload, I get CS0012 telling me that ParentMaster is defined in an assembly that is not referenced, and I need to add a reference to some assembly with a funky random-looking name (which changes when I reupload ParentMaster). Up t...

Control of the page and the controls on a page
I am building a web app that has some pages that are public and some that are only available based on subscription. Could someone explain the best way (infrastructure wise) how to control whether a server control is visible or enabledand how to control whether a page is viewable or not based on the user and whether or not the user is logged in (or not). If a user is not logged in I would like some controls to be visible but disabled. I also have to control the URL's in case a person learnsthe URL and tries to type it in. My question is more towards how to do this database wise. I am u...

Error finding the user control in master page from content page
HI, I have a master page in which i have created a header which is a user control into which contains a label.  I a accessing this label from content page.  The code for the following is mentioned below.  Sometimes it works perfectly fine however sometimes it throws object reference error.  So my application is not stable.   Any suggestions what could be the possible issue???????     Utils UT = new Utils();    protected void Page_Load(object sender, EventArgs e)    {      Sys...

Finding a control in the master page from within a control on the "child" page....
I've seen several examples of finding controls, but I'm struggling with this.  I want to turn a panel to visible and set a label's text field from within a control... All the examples that I've seen, including the really good one at MSDN2 shows Master.FindControl.  When I use that, it says Master is not declared.  Is there an easy way to set the panel and the label from within the control? Am I close? '---------- My Master page...abbreviated... <%@ Master Language="VB" CodeFile="Secure_Master.master.vb" Inherits="MasterPage" %><%@ Register TagPrefix="cc" TagName="men...

Web resources about - HELP..... Master Page Error (The page has controls that require a Master Page, but none is specified.) - asp.net.navigation-controls

Rush Limbaugh: Marco Rubio is a legitimate full-throated conservative and a disciple of Ronald Reagan ...
When I posted these clips to Twitter, a reader replied that of course Rubio is a Reagan disciple. He supports amnesty, doesn’t he? Zing. Fairly ...

Peyton Manning Retirement: Rumors Indicate That Denver Broncos Quarterback Calling It Quits After Super ...
Peyton Manning is rumored to be leaning toward retirement, as injuries and the possibility of an NFL investigation into his PED allegations have ...

Galaxy S7: Samsung’s not even trying to hide the new ‘Edge’ anymore
Much has been written about Samsung’s desire to keep its flagship devices a secret, but the South Korean titan has never really been able to ...

Zika virus infection reported in US
A rare case of the Zika virus being sexually transmitted is reported in Texas, as Brazil announces a rise in confirmed microcephaly cases.

Yahoo chairman: We’re exploring a sale in addition to Alibaba spinoff
Yahoo chairman Maynard Webb said the company is exploring “qualified strategic proposals” after the company announced it is cutting 15 percent ...

The news we’ve been waiting for: ‘LEGO Star Wars: The Force Awakens’ is happening
Waiting two years for Star Wars: Episode VIII to continue the epic story that kicked off in The Force Awakens is going to be tough for fans of ...

T-Mobile ties Verizon in US-wide speed test but lags in total coverage
(credit: T-Mobile) T-Mobile USA has matched Verizon Wireless in a series of crowdsourced speed tests but still trails both Verizon and AT&T ...

Windows 10 Is Now a "Recommended Update" That's Automatically Downloaded
Microsoft isn’t forcing Windows 7 and 8.1 users to upgrade to Windows 10, but they are pushing it on them pretty aggressively. Windows 10 is ...

Brussels proposals to keep Britain in the EU under scrutiny
LONDON (AP) — A pivotal "in or out" referendum on Britain's future in the European Union moved one step closer Tuesday as British and European ...

'There is no shadow to be cast': Famous groundhog predicts early spring season
Pennsylvania's famous weather-predicting groundhog, Punxsutawney Phil, failed to see his shadow on Feb. 2 just before 7:30 a.m at sunrise. Therefore, ...

Resources last updated: 2/3/2016 12:00:54 AM