Add scripts to head dynamically(weblogs.asp.net)

submitted by djsoliddjsolid(429) 3 years, 9 months ago

Many times when i develop a user control i have the need to add some javascript to the header of the page. But the header doesn't have a method where you can add script and RegisterStartupScript inserts the script at the bottom of the page. So i thought let's create an extension method...

1 comment |category: |Views: 27

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by Tr3vTr3v(376) 3 years, 9 months ago 0

You'd be better adding JavaScript files to the end of your page, just before the </body> tag. Look at Yahoo!'s YSlow information if you want to find out more.

Reply

information Login or create an account to comment on this story