473,608 Members | 2,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ContentPlaceHol der - size on Master Page

I'm developing my first VS2005 C# web application.

On my master page I have a "contentplaceho lder" and it covers a small
portion of the screen. I can place controls anywhere on the pages that
use it however this "break" is annoying.

Does anyone know how to resize the content place holder - I've tried
everything (tables, drag&drop, etc.)

Thanks very much!

Fred
Feb 19 '06 #1
3 9379
The content place holder assumes the size of its contents. It has no size of
its own. If you want to size the contents, try wrapping your inner content
with a table of a particular size.

--
Andrew Robinson
http://blog.binaryocean.com
"Fred Nelson" <fr**@smartybir d.com> wrote in message
news:ew******** ******@TK2MSFTN GP10.phx.gbl...
I'm developing my first VS2005 C# web application.

On my master page I have a "contentplaceho lder" and it covers a small
portion of the screen. I can place controls anywhere on the pages that
use it however this "break" is annoying.

Does anyone know how to resize the content place holder - I've tried
everything (tables, drag&drop, etc.)

Thanks very much!

Fred

Feb 19 '06 #2
Andrew:

Thanks for your reply! I'm still having problems with the content place
holder.

If I place the content place holder within a table in the master page
then I am unable to use it on pages that reference it.

If I use controls that are "absoutely" placed then they can easily
extend beyond the content place holder and overwrite any text below them
- for example binding a datagrid.

So:

Do you know of a way to make the content area respond correctly
(increase vertical size) to forms that contain absoutely placed
controls?

I can't find any way - and I want to use the absoutely placed controls
since it's much faster to develop.

Thanks again - I appreciate your help!

Fred

Andrew Robinson wrote:
The content place holder assumes the size of its contents. It has no size of
its own. If you want to size the contents, try wrapping your inner content
with a table of a particular size.


Feb 19 '06 #3
Not sure about the issue that you are having where you are unable to
reference the content place holder. To size the content, you should be
placing your content within a table and then that table within your content
place holder.

Putting a table around the content place holder within the master page, will
not maintain the size of the contained content place holder.

Can't comment on any of the absolute positioned controls. I never use those
properties and in general I think most sites avoid them.

--
Andrew Robinson
http://blog.binaryocean.com
"Fred Nelson" <fr**@smartybir d.com> wrote in message
news:uz******** ********@tk2msf tngp13.phx.gbl. ..
Andrew:

Thanks for your reply! I'm still having problems with the content place
holder.

If I place the content place holder within a table in the master page
then I am unable to use it on pages that reference it.

If I use controls that are "absoutely" placed then they can easily
extend beyond the content place holder and overwrite any text below them
- for example binding a datagrid.

So:

Do you know of a way to make the content area respond correctly
(increase vertical size) to forms that contain absoutely placed
controls?

I can't find any way - and I want to use the absoutely placed controls
since it's much faster to develop.

Thanks again - I appreciate your help!

Fred

Andrew Robinson wrote:
The content place holder assumes the size of its contents. It has no size
of
its own. If you want to size the contents, try wrapping your inner
content
with a table of a particular size.

Feb 20 '06 #4

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

Similar topics

3
2371
by: Billy Cormic | last post by:
Hello, I am using Visual Studio 2005 Beta for the first time and am having trouble using contentplaceholders. Actually, I am having trouble declaring them. Here is a snap shot of my master page: <%@ master language="C#" %> <html> <head id="Head1" runat="server"> <title>Untitled Page</title>
2
1458
by: Urs Eichmann | last post by:
Hello, I want to define a MasterPage which already has some asp:Textbox and other controls defined inside a ContentPlaceHolder. The idea is that the user of the master page just changes two or three properties of these "predefined" controls and has everything right in place. I realize I could program an ASCX or Webcontrol instead and let the users put that on the page themselves. But I would prefer if it was already predefined in the...
4
3465
by: Greg | last post by:
How do I programmatically load an .aspx page into the contentplaceholder? Similar to what would happen in the "navigateURL" property when clicking on a hyperlink on the master page. . . ASP .NET 2.0 Thanks, Greg
0
1582
by: nickster | last post by:
For some reason when I use asp controls for the default content of a ContentPlaceHolder, they do not get rendered. Static content is rendered just fine however! Specifically I'm using multiple <asp:Image> and <asp:HyperLink> controls and when I copy & paste them into a regular page, they work fine. When I paste them into the Master page's ContentPlaceHolder, they do not render. When I view the resulting page source, the controls are...
2
4900
by: news.sbcglobal.net | last post by:
Back in the good old days (or bad old days depending on your point of view) when I used frames to develop some of my web sites, I was able to designate which frame I wanted a page to open in. Now that I'm learning ASP.NET 2.0, I'm having some trouble figuring out how to do something similar. My web site has a master page with one contentplaceholder. Ordinarily, I would develop another page within the same site using the master page as a...
2
1527
by: premchandrasingh | last post by:
Hi I am using a master page in which I have only one contentplaceholder and inside this contentplaceholder I added a label. The problem is when I tried to assign some value to this label from codebehind of the master page itself it gives "Object reference not set to an instance of an object." error. I tried all my actions from page_load event and ContentPlaceHolder1_Load event with contentplacholder1.findcontrol("lbl1") and simply...
3
14951
by: jobs | last post by:
Hello. I have a master page with ContentPlaceHolder under a html Div tag. That DIV tag has CSS that positions it. While in Visual Studio design view, that div tag and contentplace holder does not appear where it actually shows up when you run it the code. Is DIV the best way to go? How else can I do this? ContentPlaceHolder
1
1505
by: mil111 | last post by:
Hi, Can anybody help me? I created master page (in table) with header, footer, left column and in the right column is contentPlaceHolder. Content on contentPlaceHolder is longer than the left column is. If I run the page left column resizes according to content in contentPlaceHolder, and I don't want that. How I can set left column on fixed size so that only contentPlaceHolder resizes. I tried with <div> and <asp:panel> but it doesn't seems...
0
1050
by: Andy B | last post by:
I have a div on the master page that is 600px high. It has a left pannel, main content (contentPlaceHolder) inside another div and a footer. What I am looking for is a few things: 1. How do you use .net (VB) or javascript to make sure the browser sticks to 800x600? 2. Is it possible to set the "leftPannel" (a div element) to a certain size and put it on the screen in a certain place regardless of how much content is in the...
0
8063
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
8002
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
6816
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...
0
5475
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
3962
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4024
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1594
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1329
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.