Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Reference Script Library in asp.net mvc 3?

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?

like image 866
chobo2 Avatar asked Feb 01 '11 00:02

chobo2


People also ask

What is @section scripts in MVC?

@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.

What is _ViewStart Cshtml in MVC?

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.

What is ASP Net mvc3?

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!

What is _layout Cshtml in MVC?

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.


1 Answers

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>

like image 60
Robert Levy Avatar answered Oct 26 '22 16:10

Robert Levy