@model ApplicationUser
@{
    var avuri = "/Avatars/"+Model.UserName+".s.png";
    var userPosted = Model.Posts!=null && Model.Posts.Count()>=1;
}
<div class="userinfo">
@if (userPosted) { <a asp-controller="Blogspot" asp-action="Index" 
asp-route-id="@Model.UserName" class="btn btn-primary">
<img src="@avuri" asp-append-version="true" class="smalltofhol" alt="@Model.UserName" title="@Model.UserName"/>
</a>
} else {
    Html.DisplayFor(m=>m.UserName);
}
</div>
