Adding script block to <head>

  • Thread starter Steve C. Orr [MVP, MCSD]
  • Start date
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.
 
S

Showjumper

Stick an asp:literal control in the head section and then set the text
property of the literal to your js function.
 
I

ibobak

We've done a separate control called Linker which is located in <head>
and is notified by other controls (on prerender phase) when its
necessary to add link to css or js, or some <script> code.
 
J

jsh02_nova

Anybody know how to add a script block to the html <head> section
programmatically without using the 'RegisterScriptBlock' functions?
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top