Cannot Resolve Method
I am trying to display IformFile property as image on my cshtml
However I am getting somewhat errors here
`
Could anyone kindly point me out what went wrong here?? My full code for your reference https://paste.mod.gg/rjxcbrftbfyc/0
However I am getting somewhat errors here
<div class="wrapper" id="preExistingDashboard">
@foreach (var listingModel in Model)
{
<div class="listing">
<div class="content">
<div>
/* The ERROR here : Cannot resolve method: GetFileName(ListingProjects_ver2) Candidates are: GetFileName(ReadOnlySpan<char>) : ReadOnlySpan<char><br/>GetFileName(string?) : string?<br/>all from class Path*/
<img src="@listingModel" alt="@System.IO.Path.GetFileName(listingModel)" style="display:block; width:100px;height:100px;">
</div>
<p>
Property Name: <span class="view-mode listing-name">@listingModel.ListingName</span>
Property Review: <span>@listingModel.ListingReview</span>
</p>
<p>I am the pre-existing dashboard</p>
<p>Age: @listingModel.Id</p>
<div class="roundPlaceholder">
<p class="roundPlaceholderTxt">Book me before you edit</p>
</div>
<div class="deleteListingBtn">
<button type="button" class="delete" id="Delete" onclick="Delete(@listingModel.Id)" class="btn btn-danger">Delete</button>
</div>
//more code lines..
</div>
</div>
}<div class="wrapper" id="preExistingDashboard">
@foreach (var listingModel in Model)
{
<div class="listing">
<div class="content">
<div>
/* The ERROR here : Cannot resolve method: GetFileName(ListingProjects_ver2) Candidates are: GetFileName(ReadOnlySpan<char>) : ReadOnlySpan<char><br/>GetFileName(string?) : string?<br/>all from class Path*/
<img src="@listingModel" alt="@System.IO.Path.GetFileName(listingModel)" style="display:block; width:100px;height:100px;">
</div>
<p>
Property Name: <span class="view-mode listing-name">@listingModel.ListingName</span>
Property Review: <span>@listingModel.ListingReview</span>
</p>
<p>I am the pre-existing dashboard</p>
<p>Age: @listingModel.Id</p>
<div class="roundPlaceholder">
<p class="roundPlaceholderTxt">Book me before you edit</p>
</div>
<div class="deleteListingBtn">
<button type="button" class="delete" id="Delete" onclick="Delete(@listingModel.Id)" class="btn btn-danger">Delete</button>
</div>
//more code lines..
</div>
</div>
}Could anyone kindly point me out what went wrong here?? My full code for your reference https://paste.mod.gg/rjxcbrftbfyc/0
A tool for sharing your source code with the world!