PC Review


Reply
Thread Tools Rate Thread

content placeholder in the masterpage

 
 
Vinnie
Guest
Posts: n/a
 
      26th Sep 2007
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

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      26th Sep 2007
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)

Vinnie wrote:
> 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
>

 
Reply With Quote
 
Vinnie
Guest
Posts: n/a
 
      26th Sep 2007
On Sep 26, 11:48 am, bruce barker <nos...@nospam.com> wrote:
> 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.

 
Reply With Quote
 
Shelly
Guest
Posts: n/a
 
      26th Sep 2007

"Vinnie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sep 26, 11:48 am, bruce barker <nos...@nospam.com> wrote:
>> 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.
>


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


 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      26th Sep 2007
"Shelly" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> 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...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Shelly
Guest
Posts: n/a
 
      26th Sep 2007

"Mark Rae [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Shelly" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> 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...


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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Content Placeholder in nested master content page John Microsoft ASP .NET 2 15th Jan 2008 11:48 AM
MasterPage Content jimmyjoe Microsoft ASP .NET 2 4th Apr 2007 08:42 PM
Masterpage Content Controls Throwing Off Content Barkster Microsoft ASP .NET 5 30th Oct 2006 06:55 PM
User control in PlaceHolder, in a MasterPage benjamin.soulier@gmail.com Microsoft ASP .NET 0 10th Aug 2006 01:16 PM
MasterPage - Content Problems TCORDON Microsoft ASP .NET 1 12th Nov 2005 04:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:23 PM.