1

I use Visual Studio 2017, I downloaded the Bootstrap package but I have no idea what should I do next. I am using bundle file and package...

What should I do?

Also I downloaded a file from get bootstrap website but I don't know how to compile it!

1 Answer 1

3

The first way is to copy the css and js file to wwwroot/lib folder in your project.

The second way is to use BootstrapCDN if you want to skip the download.

A better way of using bootstrap in asp.net core project is to use LibMan(To be able to use LibMan you should have VS 2017 version 15.8 or higher.):

1.In Solution Explorer, right-click the project folder in which the files should be added. Choose Add > Client-Side Library. The Add Client-Side Library dialog appears: enter image description here

2.Select the jsdelivr provider from the Provider drop down.

3.Type the library name to fetch in the Library text box.

4.Specify the project folder for storing the files in the Target Location text box.

5.Cilck Install button.

Then you could use the following code to reference the boostrap:

 <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
 <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

Note: As mentioned on the download site, this does not include jQuery, so if you want to use jQuery, you need to download that separately.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.