Reputation: 2986
Hope you can help me with the following:
I already created an MVC site in Visual Studio 2013. It runs OK using Bootstrap as expected. NOW, that I want to use the Foundation framework in the site as well, I'm having some problems when trying to execute the site.
Here's what I already did:
Then I opened the BundleConfig.cs file to bundle the new JS and CSS files.
//Add the Foundation scripts bundles.Add(new ScriptBundle("~/bundles/foundation").Include( "~/Scripts/foundation/foundation.*", "~/Scripts/foundation/jquery.cookie.js", "~/Scripts/foundation/fastclick.js"));
//Add the Foundation styles bundles.Add(new StyleBundle("~/Content/foundation").Include( "~/Content/foundation/foundation.css", "~/Content/foundation/foundation.mvc.css", "~/Content/foundation/normalize.css"));
I compiled the solution without any error
Then clicking on the Run button to execute the page in Firefox or Google Chrome
However the html code that used the styles are not working properly. This is the html code:
@username
Is there something that I' missing?
Thanks in advance
Upvotes: 0
Views: 452
Reputation: 457
It's silly, but in my case the problem was, that bundles registration in Global.asax.cs file was missing in Application_Start() method:
BundleConfig.RegisterBundles( BundleTable.Bundles );
remember to add
using System.Web.Optimization;
Upvotes: 0
Reputation: 8539
3.5 Add new bundles to layout
//razor markup
@Styles.Render("~/Content/foundation")
@Scripts.Render("~/bundles/foundation")
Upvotes: 0