473,698 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Master page - cannot add controls

Hi,
I'm a newbie to master pages & have added images dragged from my image
folder directly to a master page. This image is available to all forms that
use this master page.
However, if I add an image control, a frame or layer object to my master
page, then save & build, these don't show up on my forms, nor does anything
in them.

Is this expected behaviour or am I misundertanding the way a master page
should be used?

many thanks for any help here

Ant
Oct 20 '07 #1
4 1766
"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:OD******** *****@TK2MSFTNG P04.phx.gbl...
Now, from your description, I can't tell what you're doing.
The OP is placing controls *inside* the <asp:ContentPla ceHolder /tag on
the MasterPage instead of the <asp:Content /tag on the content page...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 20 '07 #2
Hi Mark,

I don't know what happened but it's all fine now. I just started from
scratch & now no issues. Before, whenever I changed content on the master
Page after associating it with web pages, the changes wouldn't show up on the
web page unless I chose "Default to Master Content" but then I would lose all
the local content I added, unless I chose "Choose Custom content", so it was
either one or the other (?). Additionally, it was rendering button controls
right across the screen.
There must have been something wrong with that initial Master page 'build'.
As you noted, it was not adding controls into content placeholder in the
markup when it should have.

Anyway, alls well that end well...

P.S It's a great tool. I'm sold!

"Mark Rae [MVP]" wrote:
"Kevin Spencer" <un**********@n othinks.comwrot e in message
news:OD******** *****@TK2MSFTNG P04.phx.gbl...
Now, from your description, I can't tell what you're doing.

The OP is placing controls *inside* the <asp:ContentPla ceHolder /tag on
the MasterPage instead of the <asp:Content /tag on the content page...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #3
"Ant" <An*@discussion s.microsoft.com wrote in message
news:3D******** *************** ***********@mic rosoft.com...
As you noted, it was not adding controls into content placeholder in the
markup when it should have.
In fact, it's the other way round... You had placed controls *inside* your
<asp:ContentPla ceHoldertag when you shouldn't, because they will get
overwritten when the page builds itself...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #4
Hi Mark,

Thanks for the reply; the odd thing is though that I hadn't touched the
Markup at all. It had all been done from the UI, so I don't know how it could
have happened.
but anyway...

Thanks

Ant

"Mark Rae [MVP]" wrote:
"Ant" <An*@discussion s.microsoft.com wrote in message
news:3D******** *************** ***********@mic rosoft.com...
As you noted, it was not adding controls into content placeholder in the
markup when it should have.

In fact, it's the other way round... You had placed controls *inside* your
<asp:ContentPla ceHoldertag when you shouldn't, because they will get
overwritten when the page builds itself...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 22 '07 #5

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

Similar topics

5
2432
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the web part page? Does it take place at the page level? ...or the content area level? 3. Where is the Web Part Manager instantiated? ...in the Master Page? ....Content Page? ...elsewhere?
14
2400
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
8
2364
by: PJ | last post by:
How can I get a reference to the master page class? It is defined as a partial class, but I cannot seem to type a variable to the name of the partial class? The compiler continually shows "The type 'MyMaster' is not defined." I would like to reference the master page from a control, by casting the Master property of the Page property to the type, but obviously I cannot do this if I can't get a reference to the actual type. Thanks,
3
6430
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property BarLabelText. I now have a contentpage "FooBar.aspx", where "Bar.master" is the master page and in the content section has the control "Foo.ascx".
4
3983
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: hypTabAccount.InnerText = "blah" Now, what I want is the same in a content page that uses the Master Page. I have a Master Type in my Content page:
0
1557
by: Kevin Frey | last post by:
We have a data-centric application where all of the "layout" for each data centric page is to be codified (ie. it is expressed in C# code rather than being expressed declaratively). This codification subsequently produces the required web-controls for a page based on whether the page is eg. in view or update mode, examination of the user's security permissions for certain fields, etc. In VS2003 our "Page Master" (to use the VS2005 term)...
7
2179
by: Just Me | last post by:
Hi I have a master page with a control on it, but I need to set a property of that control from the content. my master page is called Admin.Master and the class is Admin. I have tried this
1
7550
by: =?Utf-8?B?TGFycnkgRXBu?= | last post by:
I have an app using Ajax. The scriptmanager is within the form that is within the master page. I also have web user controls that are doing partial rendering and are "borrowing" or "inheriting" the scriptmanager from the master page. Heck, when they're rendered, the scriptmanager is on all the pages and it works. However, in the VS2005 designer, I constantly see "Can't render image" errors, and it's nearly impossible to effectively use...
0
2187
by: robgallen | last post by:
I have 2 user controls within a master page, and I would like one of them to call a function in the other. All the examples I have seen involve a page communicating with the Master page, or with a user control communicating with the Master page, not with a user control directly talking to another user control, bypassing the page itself. So, I have the following files: Haep.master - which contains:
0
8675
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
8604
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
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8897
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
8862
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...
0
7729
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
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...
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2002
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.