Microsoft has used Bootstrap in their new ASP.Net MVC 5 template. It's really great. However it uses the version 2.3.1 of it and the Bootstrap guys are moving towards the 3 version already. I could just easily rewrite the entire views and the layouts based on the new version but I was wondering if somewhere, someone else has done it (maybe by a long shot the Microsoft folks?).
Right-click Project -> Manager NuGet Packages -> Click icon setting configuration, add package source. You can see bootstrap in project after a successful installation. Okay, installation is successful! Ok, we successfully installed bootstrap in ASP.NET MVC 5!!
Go to the References folder right click on the folder >Find>Manage NuGet Packages>Click on the option. Install bootstrap package. Bootstrap is installed automatically and css files are saved in content folder and js files are saved in script folder.
Since Bootstrap is all HTML, CSS and JavaScript, all open standards, you can use it with any framework including ASP.NET MVC. When you start a new MVC project, Bootstrap will be present, meaning you'll find Bootstrap.
I know the rules (that I really appreciate) is to put code here instead of link for my blog post but it's just too many small corrections to put them here.
http://www.ghislainproulx.net/Blog/2013/09/using-bootstrap-3-with-visual-studio-2013-aspnet-mvc-template
I have created a NuGet package Bootstrap.MVC.EditorTemplates.Sample that contains a Bootstrap 3 based sample site, plus some additional bootstrap controls and culture-aware validation. This works with the VS 2013 RC MVC5 template.
It uses the Twitter.Bootstrap.Less package instead of the plain bootstrap package, it is best to "uninstall-package bootstrap" from the default MVC 5 site before installing it in the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With