content placeholder in the masterpage

V

Vinnie

working with asp.net 2.0 C#, once i create a masterpage i'm
practically unable to resize the content placeholder: can anyone tell
me what i should do? I tried to resize it by dragging the small
squares at the border, but it does not allow me to do anything.

any idea?

Thanks
 
B

bruce barker

the content placeholder is just that a place holder. it doe not render
any html itself, so it has no size properties. you can place it in a
panel, and size the panel.

-- bruce (sqlwork.com)
 
V

Vinnie

the content placeholder is just that a place holder. it doe not render
any html itself, so it has no size properties. you can place it in a
panel, and size the panel.

-- bruce (sqlwork.com)


Hi Bruce,
this what happens:
when i add a masterpage to my website, in design view i see on the top
of the page a rectangle: if i want to place a picture above that
rectangle i can't; also, if i want to put another placeholder on the
left side to create a layout like an upside down L (for the logo at
the top of the page and themenu bars on the left side) i can't becouse
the first one is too big and covers all the upper side of the page.

What i wish to do:
a)create a placeholder in the middle of the page, so i can work on the
upper side (to insert the logo), the left side (so i can insert the
menu bars) and the right side (so i can add some text in textboxes);
b) create another placeholder at the bottom so i can work on the
content pages to add some stuffs.

Thanks for your help.
 
S

Shelly

Vinnie said:
Hi Bruce,
this what happens:
when i add a masterpage to my website, in design view i see on the top
of the page a rectangle: if i want to place a picture above that
rectangle i can't; also, if i want to put another placeholder on the
left side to create a layout like an upside down L (for the logo at
the top of the page and themenu bars on the left side) i can't becouse
the first one is too big and covers all the upper side of the page.

What i wish to do:
a)create a placeholder in the middle of the page, so i can work on the
upper side (to insert the logo), the left side (so i can insert the
menu bars) and the right side (so i can add some text in textboxes);
b) create another placeholder at the bottom so i can work on the
content pages to add some stuffs.

Thanks for your help.

Why can't you do what you want. I am just learning asp.net and did that
right away. My master page has all sorts of stuff above and below the
content placeholder. It was never a problem.

Hmm, you are adding placeholders all over the place? I added controls.
There was only one placeholder in the middle of the body area of the master
page, and that was satisfied by the content page. If you are doing all this
with placeholders, then it seems to me that all your actual code will be in
the content page -- which defeats the purpose of having a master page. At
least as I understand it, the master page provides the common look and feel
(logos, placement, etc) and the content page varies with page to page and is
placed in the content placeholder section of the body.

Shelly

Shelly
 
M

Mark Rae [MVP]

At least as I understand it, the master page provides the common look and
feel (logos, placement, etc)

That's correct.
and the content page varies with page to page and is placed in the content
placeholder section of the body.

In fact, it's precisely the opposite - this is sometimes a difficult concept
for people to grasp, especially if they're familiar with HTML framesets...

A MasterPage is just a UserControl - it's nothing at all like a frameset...

When you go to a content page, the MasterPage doesn't fill its placeholder
with the content page - the content page surrounds itself with the
MasterPage.

This may sound like the same thing, but it isn't...
 
S

Shelly

Mark Rae said:
That's correct.


In fact, it's precisely the opposite - this is sometimes a difficult
concept for people to grasp, especially if they're familiar with HTML
framesets...

A MasterPage is just a UserControl - it's nothing at all like a
frameset...

When you go to a content page, the MasterPage doesn't fill its placeholder
with the content page - the content page surrounds itself with the
MasterPage.

This may sound like the same thing, but it isn't...

OK, I can understand what you are saying. It is the content page that is
doing the driving.

In php it is the same thing (sort of). The way I code, at least, the
content page will pull in the surrounding stuff through including their
files. Those surrounding files make up a template, which is akin to the
master page.

Here, in aspx, it is the content pages that says "Oh, I am inside a content
control. I better look to see what Master Page is needed and surround
myself with that stuff".

The only difference between the fill in and surround it, is who is behind
the wheel and who is in the shotgun seat.

Shelly
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top