Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Bootstrap 3 RC1 in the New MVC 5

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?).

like image 736
Alireza Noori Avatar asked Jul 31 '13 21:07

Alireza Noori


People also ask

How to add bootstrap in MVC 5?

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!!

How do I add bootstrap to MVC app?

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.

Can I use bootstrap with ASP NET?

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.


2 Answers

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

like image 133
Ghislain Proulx Avatar answered Oct 16 '22 10:10

Ghislain Proulx


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.

like image 37
Maarten Avatar answered Oct 16 '22 11:10

Maarten