KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got your average e-Commerce app, I store ITEM_IMAGE_NAME in the database, and sometimes managers MISSPELL the image name. To avoid "missing images" (red X in IE), every time I display the list of products, I check the server for the image related to the product, and if that file doesn't exist - I replace it with default image. As far as i can tell this doesn't affect performance, but I was wondering if there are any alternatives to fix a "missing image" problem. I'm using ASP.NET + C# (.NET 3.5) Some code: foreach (Item item in Items) { string path = Path.Combine("~/images/", item.categoryImage); item.categoryImage = File.Exists(Server.MapPath(path)) ? item.categoryImage : GetImageDependingOnItemType(); }
Tags (comma-separated)
Save Edits
Cancel