In my MVC3 application I have many different screens and these all use a master layout. Seven of the screens all use the same code such as that below:
<script src="@Url.Content("~/Scripts/x/tiny_mce.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/y/ajaxOnFailure.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/y/tinyMCEOptions.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/updateField.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/gridClick.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/z/createDialog.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/a/dialogSuccess.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/a/refreshGrid.js")" type="text/javascript"></script>
I would like to have some way of putting all of these lines into an external file and then have them added.
is there some way I can have one file which I add to my razor view and inside that file imports all the javascript files above?