1.在App_Start文件夾中BundleConfig.cs類中添加相應的文件css
1.1bundles.Add(new ScriptBundle("~/bundles/adminJs").Include("~/Scripts/jquery.js", "~/Scripts/jquery.form.js"));jquery
1.2bundles.Add(new StyleBundle("~/Content/adminCss").Include("~/Content/base.css", "~/Content/right.css", "~/Content/validation.css"));orm
2.在Global.asax文件中開啓壓縮文件操做ip
BundleTable.EnableOptimizations = true; //啓用這一行,則使用Bundle的機制進行文件打包io
3.在相應的VIEW調用便可form
@Scripts.Render("~/bundles/validate")打包