Using Bootstrap in your ASP.NET MVC application
There are different ways to get Bootstrap for your application:
Refer to the Bootstrap file available at the CDN (Content Delivery Network) in your application
Download the source code
Install with Bower
Compile with Grunt
Of these options, the easiest option is the first one.
Open the layout file (_Layout.cshtml
) in the application that we created earlier. Include the CSS files at the top (within the head
tag) and the scripts at the bottom (at the end of the body
tag):
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <...