0

Image path on publish project in ASP.NET doesn't work.

This is my image path: var imgSrc = "~/Images/Markers";

In Markers folder, I have icons that I want to display depending on the logged-in user. It works fine on local but it's not working when I publish the project on IIS.

1 Answer 1

1

Two reasons for that :
1. give path like "/Images/Markers" instead of "~/Images/Markers".
OR
2. check at published directory image is exist or not,some time after publish image not copied so.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.