possible to render into the <HEAD> section?

P

PJ6

I want to render this text into the <HEAD> section of a page (and perhaps
mute any existing title declaration, or alter it to be this instead) -

<title runat="server" id=HtmlTitle></title>

It seems Render only sends items into the <BODY>.

Actually, it would be nice if I had control over the entire rendering
process, including the whole <HEAD>.

It what I want to do possible?

Paul
 
M

Mark Fitzpatrick

You can do this. I do it all the time. Just reference it as an
HtmlGenericControl in your code and it should be fine.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
B

Brock Allen

Yes, this is possible. The approach I've taken in the past is to create my
own custom control that I place at the top of the document, right after the
<html> element. My custom control then is responsible for rendering <head>
and anything else I want in the <head>. Each page controls what is emitted
based upon properties on my custom head control. So, yep, it's possible;
it's just code, so make it do what you want :)
 
S

Steve C. Orr [MVP, MCSD]

Put this in the HTML view of your header section:

<%=MyScriptBlockFunction()%>

Then define MyScriptBlockFunction to return whatever script text you'd like.
 

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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top