Apr 22, 2020 08:09 PM|mgebhard|LINK
Well you sort of did but you didn't say what imagePath is. I asked this but got no answer from you. When I use your code I get an error on imagePath. I'm assuming that's a string param??
I did answer the question. It is a string that contains the path to a png image.
private readonly string imagePath = @"C:\inetpub\wwwroot\images\guitar_PNG3362.png";
Also what is 'Home' in the UrlAction on the view? That's not a controller action in the controller example you provided.
I wrote the demo in the my Home controller. Sorry, I did not think someone with your experience would have trouble with an image path and controller name.
Anyway, your code has issues. You'll need to debug to figure out where the code goes south. Or you can share photo service so the community can perform a code review.