Managing Scripts for Razor Partial Views and Templates in ASP.NET MVC(forloop.co.uk)

submitted by russcamrusscam(32) 6 months, 9 days ago

Useful HTML helpers for effectively managing JavaScript files and blocks of code within ASP.NET MVC layouts, views and templates.

2 comments |category: |Views: 35

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 dpetersondpeterson(4397) 6 months, 9 days ago +1

That's really slick, I run into this problem quite often as we try to load everything (including jQuery) after we load the body of the page. As a result any script we have to run before the body loads can't take advantage of jQuery. I find that this does help us consider how we write code very carefully, but it does also make things more difficult sometimes.

Reply

posted by russcamrusscam(32) 6 months, 9 days ago 0

Thanks! After some digging around in the framework, I think I've got a slightly more elegant approach. I've now updated the article with the new approach :)

Reply

information Login or create an account to comment on this story