When add image to edit button it display image as not defined or not clear why?

Ahmed Salah Abed Elaziz 390 Reputation points
2023-04-23T14:49:21.5666667+00:00

I work on blazor server side . I face issue I can't add png edit image to button make edit image I need to edit button with extension png on wwwroot/img/edit.png what I try is

<button type="button"  data-bs-toggle="modal" data-bs-target="#exampleModal" @onclick="(()=> editClick(d))">
                                                        
                                                    <img src="/img/edit.png"/>
                                                        </button>

as image edit below it display as not defined so How to solve this issue ? editbutton

Image edit I added to button as below : https://filetransfer.io/manage-package/eP8Sfa3d

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,240 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,420 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 57,891 Reputation points
    2023-04-23T15:24:05.7266667+00:00

    use the browsers network trace to see the error. also I see this is a bootstrap modal toggle. be sure the modal html is outside the blazor <app/> tag (not hosted by a blazor component).