I noticed when you make a strongly typed view you have an option to check a box called "reference script libraries"
http://gyazo.com/289392fc957866f19c4ae6d8b51a037e.png
In my case I don't have any strongly typed views but what references does it add?
@section allows you to include those files only for certain views. It is needed since, a view cannot easily change the contents of the _Layout. cshtml otherwise. You can also position the @section at the bottom of the layout, for JavaScript files for example, or at the top of the layout, for CSS files.
The _ViewStart. cshtml page is a special view page containing the statement declaration to include the Layout page. Instead of declaring the Layout page in every view page, we can use the _ViewStart page. When a View Page Start is running, the “_ViewStart. cshtml” page will assign the Layout page for it.
ASP.NET MVC 3 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the . NET Framework. It installs side-by-side with ASP.NET MVC 2, so get started using it today!
The file "_Layout. cshtml" represents the layout of each page in the application. Right-click on the Shared folder in Solution Explorer then go to "Add" item and click on "View". Now the View has been created.
It just adds this:
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With