MVC3 Razor - Adding JavaScript and CSS files to document head
I've used this before but i've forgotten the name of the method. I'm guessing it must be exclusive to MVC3/Razor. Is there a method that allows you to include a JavaScript or CSS file and then specify that it should be in the head. I remember it as two different methods similar to the following
IncludeJS("my.js").AtHead();
IncludeCSS("my.css").AtHead();
They might be HTML help开发者_如何学Goers but I can't find any reference to them anywhere. Am I going mad?
Check this question, best answer supposed to do what you need: ASP.Net MVC 3 Razor: Include js file in Head tag
What you're talking about sounds like a custom helper similar to:
Add CSS or JavaScript files to layout head from views or partial views
精彩评论