1. Define bundle:
public class BundleConfig
{
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
}
}
2. Register Bundle:
In Global.asax
protected void Application_Start()
{
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
3. Refer bundle
In Razor view
@Scripts.Render("~/bundles/jquery")
Thursday, November 14, 2013
How to implement multiple [Order by] in LINQ?
Var list = _db.Lists.Orderby(c => c.filed1).ThenBy(n => n.field2)
Wednesday, November 13, 2013
Prevent Duplicate Form Submission
http://shaiekh.com/home/prevent-duplicate-form-submission/
- Disable submit button
- PRG (Post/Redirect/Get)
- Unique token in the session
- Disable submit button
- PRG (Post/Redirect/Get)
- Unique token in the session
Subscribe to:
Posts (Atom)