Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

@Html.RenderPartialAsync

$
0
0

I am using @HtmlRenderPartialAsync and the resulting view displays the following message under each partial that looks pretty ugly:

System.Threading.Tasks.Task`1[System.Threading.Tasks.VoidTaskResult]

I have researched solutions for previous versions of MVC, but have not seen a solution for .NET Core with VS Community 2015.

Here is my RenderPartial code:

<div class="row">
            @*Loops through all the applications in the db and displays as partials to look like a card*@
            @foreach (var item in Model)
            {
                @Html.RenderPartialAsync("~/Views/FazztApplications/_ApplicationsCard.cshtml", item);
            }</div>

And here is my code for the partial:

<div class="col-md-4 column cardbox"><img src="@Url.Content(Model.ApplicationImage)" alt="@Model.ApplicationName" class="img-responsive"><div class="cardtitle">@Html.DisplayFor(modelItem => Model.ApplicationName)   <a href="/FazztApplications/Details/@Model.FazztApplicationId" class="pull-right btn btn-md"><span class="glyphicon glyphicon-plus"></span></a> </div></div>

What is the solution to this?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>