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

Developer technologies ASP.NET ASP.NET Core
Developer technologies .NET Blazor
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    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).


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.