Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 helpers but I can't find any reference to them anywhere. Am I going mad?

like image 963
moefinley Avatar asked Jul 07 '11 16:07

moefinley


1 Answers

Check this question, best answer supposed to do what you need: ASP.Net MVC 3 Razor: Include js file in Head tag

like image 159
Ivan Sokalskiy Avatar answered Sep 28 '22 06:09

Ivan Sokalskiy