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 677049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:59:46+00:00 2026-05-14T00:59:46+00:00

How to show a image in database in the image control of Asp.net? We

  • 0

How to show a image in database in the image control of Asp.net? We have to show the image of employee along with his details in the asp.net page, but the issue is how to show the image on the asp.net image control for the image control takes picture by the property ImageUrl.

Kindly guide….

  • 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-05-14T00:59:46+00:00Added an answer on May 14, 2026 at 12:59 am

    You can create an HttpHandler(ashx) page which would take a querystring and set that as the imageUrl property of the image control

    <asp:image id="imgEmployee" imageUrl="DisplayImage.ashx?employeeId=<someId>"/>
    

    Now in DisplayImage.ashx, you can override the Processrequest like below:-

        public void ProcessRequest (HttpContext context) 
        { 
              int employeeId;
              if (context.Request.QueryString["employeeId"] != null)
       employeeId = Convert.ToInt32(context.Request.QueryString["employeeId"]);
              else
                throw new ArgumentException("No parameter specified");
    
            byte[] imageData= ;// get the image data from the database using the employeeId Querystring
            Response.ContentType = "image/jpeg"; // You can retrieve this also from the database
            Response.BinaryWrite(imageData);
    
        } 
    

    Web.config changes:-

    <httpHandlers>
      <add verb="*" path="img/*" type="DisplayImage"/>
    </httpHandlers>
    

    Details here and here.

    Hope this helps..

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

Sidebar

Related Questions

Which control should I use to show post records from my database in ASP.NET?
I have a page with an image, and two options: Show image full browser
I have a button on my ASP.NET page, which fetches some data from my
I want to show image in the dropdown using asp.net c#, I got the
I have a ASP.NET web app that utilizes ReportViewer to show local reports. Everything
I'm new to ASP.NET, but I've seen a lot of tutorials and even have
I have Default.aspx with several controls along with Uploadify Image upload control and i
I have an image column in a database table, and I want to show
i working on asp.net & C# i have datagrid that contain my database. i
I have a JSF page where I want to show a image. The image

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.