Thursday, November 14, 2013

How to use bundle for Javascript and css in ASP.NET MVC?

1. Define bundle:
    public class BundleConfig
        // For more information on Bundling, visit
        public static void RegisterBundles(BundleCollection bundles)
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
2. Register Bundle:
In Global.asax
        protected void Application_Start()
3. Refer bundle
In Razor view

"display: inline-block" (Items does not display horizontally) not working in IE

Change to:
display: inline;

How to implement multiple [Order by] in LINQ?

Var list = _db.Lists.Orderby(c => c.filed1).ThenBy(n => n.field2)