---
title: "display [no image found] when image src returns no image"  
description: "display [no image found] when image src returns no image"  
author: "Anonymous User"  
published: 2015-01-16  
updated: 2015-01-16  
canonical: https://www.mindstick.com/forum/12868/display-no-image-found-when-image-src-returns-no-image  
category: "asp.net"  
tags: ["c#", "html5", "image view"]  
reading_time: 1 minute  

---

# display [no image found] when image src returns no image

I generate my [image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) src from databse [field](https://www.mindstick.com/forum/160867/does-mindstick-provide-training-for-field-marketing) called [pictureName]. I want when [Picture](https://answers.mindstick.com/qa/38554/name-the-oscar-winning-sound-designer-who-became-the-first-asian-to-win-the-award-for-best-sound-for-documentary-india-s-daughter-at-the-coveted-motion-picture-sound-editors-63rd-annual-golden-reel-awards) name is [null](https://www.mindstick.com/forum/33922/how-to-use-null-coalescing-operator-in-c-sharp) or the name doesn't return image to display [image not found] picture. \
Here is my aspx code to generate img:

<img src="WEBIMAGES/<%#Eval("BrandName")%>/<%# Eval("PictureName") %>" alt="" [title](https://www.mindstick.com/articles/12860/how-to-get-financing-for-salvage-title-cars)="<%# Eval("ProductName") %>">

my [images](https://www.mindstick.com/interview/1067/what-is-the-php-predefined-variable-that-tells-the-what-type-of-images-that-php-support) divided into folders for each brand. i have noImage.jpg in every folder. \
how to display this image when no image displayed. \
I'm using [asp.net webforms](https://www.mindstick.com/forum/155702/difference-between-asp-dot-net-webforms-and-asp-dot-net-mvc) \
I tried to use onerror [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london), but not working. \
\
Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)

## Replies

### Reply by Anonymous User

You could use a coalesce on the picture name as follows:

<img src="WEBIMAGES/<%#Eval("BrandName")%>/<%# Eval("PictureName") ?? 'noImage.jpg' %>" alt="" title="<%# Eval("ProductName") %>">


---

Original Source: https://www.mindstick.com/forum/12868/display-no-image-found-when-image-src-returns-no-image

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
