Hello everyone. Today I start learning about tag helpers. But when run my app and inspect a page by Developer Tools I see that tag helper don't generate correct HTML.
Here is the code in my cshtml file
@model dotnetCore.Models.Customer<form asp-controller="Home" asp-action="Create" method="post"><div asp-validation-summary="ValidationSummary.All" class="text-danger"></div><div class="form-group"><label asp-for="CustomerName">Customer Name</label><div><input asp-for="CustomerName" type="text" class="form-control" /><span asp-validation-for="CustomerName"></span></div></div><div class="form-group"><label asp-for="Company">Company</label><div><input asp-for="Company" type="text" class="form-control"/><span asp-validation-for="Company"></span></div></div><div class="form-group"><div><input type="submit" value="Create" style="color:red; border-style:solid;border-color:red" /></div></div></form>
And here the source when I inspect it
<html><head></head><body><html><head><title></title><link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css"></head><body><form asp-controller="Home" asp-action="Create" method="post"><div asp-validation-summary="ValidationSummary.All" class="text-danger"></div><div class="form-group"><label asp-for="CustomerName">Customer Name</label><div><input asp-for="CustomerName" type="text" class="form-control" /><span asp-validation-for="CustomerName"></span></div></div><div class="form-group"><label asp-for="Company">Company</label><div><input asp-for="Company" type="text" class="form-control"/><span asp-validation-for="Company"></span></div></div><div class="form-group"><div><input type="submit" value="Create" style="color:red; border-style:solid;border-color:red" /></div></div></form></body></html></body><footer> AAA</footer></html>
Anyone please show me the way to fix it . Thank you