Master Page ContentPlaceHolder in <header> area

B

Bob Delaney

I have been wading through tutorials and PDF files on MSDN and various
other .Net and ASP.Net sites trying to see if one can have an
<asp:ContentPlaceHolder> block within the <header> region on a MasterPage,
and have the Content Page generate <header> information. One on-line
tutorial on MSDN says "I think so," and I am looking for a more definitive
answer. I am trying to do it without success so that I can put clint-side
JavaScript into a page.
Bob Delaney
 
D

David Wier

What exactly, dynamically, are you trying to accomplish in the header?
You wouldn't necessarily need a contentplaceholder for that (and for that
matter, there shouldn't be a need, since the idea for a content placeholder
is for data on the page itself. There are many ways, using a Master page,
that you can still do dynamic programming in the header section........we
just need more specific questions.

David Wier
MVP/ASPInsider
http://aspn101.com
http://aspexpress.com
 
E

Erik Funkenbusch

I have been wading through tutorials and PDF files on MSDN and various
other .Net and ASP.Net sites trying to see if one can have an
<asp:ContentPlaceHolder> block within the <header> region on a MasterPage,
and have the Content Page generate <header> information. One on-line
tutorial on MSDN says "I think so," and I am looking for a more definitive
answer. I am trying to do it without success so that I can put clint-side
JavaScript into a page.
Bob Delaney

You need not use a content placeholder in the header, the header itself can
be it's own content placeholder of sorts.

By the way, Javascript doesn't have to be in the header either. It can be
in the body as well.
 
M

Mark Rae

I have been wading through tutorials and PDF files on MSDN and various
other .Net and ASP.Net sites trying to see if one can have an
<asp:ContentPlaceHolder> block within the <header> region on a MasterPage,
and have the Content Page generate <header> information.

There's no need to do that - the ContentPage can add anything you like to
its MasterPage's header, including new metatags, new stylesheets, new
JavaScript includes etc...

What are you trying to do exactly...?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top