I have created 2 bundles in my mvc project as given below:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBund
Add a key in webconfig
Create a class, where we define the format for both JavaScript and styles. using System.Configuration;
namespace BundlingSample
{
public class SiteKeys {
public static string StyleVersion {
get {
return "";
}
}
public static string ScriptVersion {
get {
return "";
}
}
}
}
@Styles.RenderFormat(SiteKeys.StyleVersion,"~/Content/css")
@Scripts.RenderFormat(SiteKeys.ScriptVersion,"~/bundles/jquery")