Well, I have the following scenario:
I query the database and I bring a IEnumerable<>
to View
:
<section class="container">
<article class="row">
@foreach (var item in Model)
{
<div class="col-md-4">
<div class="thumbnail">
<h3 style="background-color:orangered; margin:0; text-align:center;color:white;">@Html.ActionLink(item.Titulo, "MostraPublicacao", "Publicacao", new { id = item.PublicacaoId })</h3>
<img src="~/Uploads/Imagens/teste.jpg" class="col-md-12 " style="padding:0;" />
<div>
@Html.DisplayFor(model => item.Resumo);
</div>
</div>
</div>
}
</article>
</section>
So, my TITTULO is received by this line
@Html.DisplayFor(model => item.Resumo);
I need to display the text of the summary in a @Html.ActionLink()
to be a link
in order to redirect to another View
, which will receive the ID of this Object as a parameter
An image to try to better illustrate the problem:
How do I solve this problem?