Master Page ContentPlaceHolder in <header> area

  • Thread starter Thread starter Bob Delaney
  • Start date Start date
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
 
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
 
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.
 
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...?
 
Back
Top