Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9007197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:37:26+00:00 2026-06-16T01:37:26+00:00

I am using handler to display image from database in my web page. I

  • 0

I am using handler to display image from database in my web page.

I have given url of handler with passing category code for its image. But if no image found from db then I want to display no image in place of that handler url.

My code: I am using below image in my repeater control and want no image if no image found from db.

<img src="Webservice/AppServices.ashx?type=categoryimage&catid=<%# Eval("ProductCategorieId") %>" height="100" width="120" class="catimage" />

How can I check with that url and display no image?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:37:27+00:00Added an answer on June 16, 2026 at 1:37 am

    Use onerror event like this:

    <img src="MyHandler.ashx?id=myId" onerror="this.src='errorImage.png';" />
    

    this.src should point to an existing image!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to display an image from the database in an ASP.NET web page.
I have an ASHX handler that I am using to display images that are
I'm using spring and hibernate to display an extjs chart from database. But, when
I'm trying to display an image file from a directory using a PHP echo
When manipulating Handler Mappings using the Microsoft.Web.Administration namespace, is there a way to remove
I have an event handler set up using plain javascript like this: myElement.addEventListener('drop', handleDrop,
I'm using code in the Application_BeingRequest() handler of my Global.asax to do some very
Possible Duplicate: What's the best way to display an image from a sql server
I am using WPF to display the image in the clipboard. This works fine
I have two different windows, one will to display streams on a image and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.