0
When running the project and calling the view is returning me the following error:
The view at '~/Views/Produto/List.cshtml' must derive from WebViewPage, or WebViewPage<TModel>.
View code:
@using Domain.Entidades
@model IEnumerable<Produto>
@{
ViewBag.Title = "Produtos";
}
@foreach(var p in Model)
{
<div>
<h3>@p.Nome</h3>
@p.Descricao
<h4>@p.Price.ToString("c")</h4>
</div>
}
How to solve?
Post the view code
– Jéf Bueno
Post the code for the List.cshtml file
– PauloHDSousa
added the code to the question
– Desalex
How is the file
Web.config
of the directoryViews
?– Leonel Sanches da Silva