Thank you all.
I'm a bit confused.
I hav created a new empty ASP.NET MVC 5 project with VS2022.
I can see that Bootrstrap 5.2.3 is installed by default
In the Content folder I have a lot of files automatically created:
The Site,cc file has only these lines
Finally I changed the bundleconfig.cs file as follow
Some questions:
- copy the superhero.css file is enough to apply the new theme? The site style looks like the downloaded theme.
- the html generated by the vs2022 asp.net has class names not present in site.css or superherp.css or other .css files inthe context folder. Why?
This is an example of the create view page. As you can see there are "field-validation-error" or "input-validation-error" that I can't find anywhere. In the superhero.css on bootswatch there are "is-invalid" or "has-error" class names .
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EmployeeCreate - My ASP.NET Application</title>
<link href="/Content/superhero.css" rel="stylesheet"/>
<link href="/Content/site.css" rel="stylesheet"/>
<script src="/Scripts/modernizr-2.8.3.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="/">Application name</a>
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" title="Toggle navigation" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse d-sm-inline-flex justify-content-between">
<ul class="navbar-nav flex-grow-1">
<li><a class="nav-link" href="/">Home</a></li>
<li><a class="nav-link" href="/Home/About">About</a></li>
<li><a class="nav-link" href="/Home/Contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div class="container body-content">
<h2>EmployeeCreate</h2>
<form action="/Home/EmployeeCreate" method="post"><input name="__RequestVerificationToken" type="hidden" value="bD9XHFKF-i-e3W6FEr1HNj7o8xTb5cjGcqfyRLQY7q3FwbwAgwXU-jayg5Qy43MELU7KJoexpQGROz3BTk6K6m6S3o0O5P7wMw6OXJrpniI1" /> <div class="form-horizontal">
<h4>Employee</h4>
<hr />
<div class="form-group">
<label class="control-label col-md-2" for="Name">Name</label>
<div class="col-md-10">
<input class="form-control text-box single-line" data-val="true" data-val-required="Name è campo obbligatorio" id="Name" name="Name" type="text" value="" />
<span class="field-validation-valid text-danger" data-valmsg-for="Name" data-valmsg-replace="true"></span>
</div>
</div>
<div class="form-group">
<label class="control-label col-md-2" for="LastName">LastName</label>
<div class="col-md-10">
<input class="form-control text-box single-line" data-val="true" data-val-required="LastName è campo obbligatorio" id="LastName" name="LastName" type="text" value="" />
<span class="field-validation-valid text-danger" data-valmsg-for="LastName" data-valmsg-replace="true"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a href="/">Back to List</a>
</div>
<hr />
<footer>
<p>© 2023 - My ASP.NET Application</p>
</footer>
</div>
<script src="/Scripts/jquery-3.4.1.js"></script>
<script src="/Scripts/bootstrap.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
</body>
</html>