Friday 30 August 2013

Adding Javascript and other JQuery libraries to MVC

open the file bundleconfig.cs in app_start

add your library

bundles.Add(new ScriptBundle("~/bundles/jquery.autosize").Include(
                   "~/Scripts/jquery.autosize*"));

 

then in Views \ Shared \ _Layout.cshtml add the line:

        @Scripts.Render("~/bundles/jquery.autosize")

No comments:

Post a Comment