I'm putting a table inside the Edit view.
Edit View (Contract)
@if (Model.ContratoParcela.Any())
{
<table class="table parcela-lista">
@foreach (var parcela in Model.ContratoParcela)
{
<tr>
<th>
<a href="#" data-contratoid="@parcela.id_Contrato" data-toggle="modal" data-target="#ModalParcelaEdit">@parcela.valor</a>
</th>
</tr>
}
</table>
}
But @if is red, underlined.
I want to get the information from the ContractParcela table and display it in the Edit view that comes from the Contract table.
I get this error:
Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@".