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

  • Home
  • SEARCH
  • 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 7522919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:38:56+00:00 2026-05-30T02:38:56+00:00

I have images stored in the database in byte data type . And i

  • 0

I have images stored in the database in byte data type . And i get the byte array as the following :

Stream photo_stream = Photo_DAL.RetrievePhoto(int.Parse(reg);
byte[] photo_bytes = Photo_DAL.StreamToByteArray(photo_stream);

but I don’t know how to make the imageurl =”some url”??

I search and find some articles about handler , but really i don’t know how to use it.please How to read the image like this with some explanation ?

  • 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-30T02:38:58+00:00Added an answer on May 30, 2026 at 2:38 am

    I search and find some articles about handler , but really i don’t know how to use it

    You could add a generic handler to your page (MyImage.ashx):

    public class MyImage : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            string imageId = context.Request["imageId"];
            // use the image id to fetch the photo bytes from the backend
            byte[] photoBytes = ...
            // ensure the content type matches the one of your image
            context.Response.ContentType = "image/png";
            context.Response.BinaryWrite(photoBytes);
        }
    
        public bool IsReusable
        {
            get { return true; }
        }
    }
    

    and then in some web form you could point the ImageUrl property of an Image control to the generic handler and pass the id of the image as query string parameter:

    <asp:Image ID="myimage" runat="server" ImageUrl="~/myimage.ashx?imageid=123" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL database that contains images stored as a byte array. I
In my database I have stored images in the image data type, showing up
I have a gridview which displays data for all employees and their images (stored
I have a series of images stored in a MySQL database that I am
I have a bunch of images stored in my database as blobs that I
I have some pretty large PNG images stored in a database (example 1000x15000 px,
How do I retrieve images stored in my database as real images, I have
I have images stored in a database in the form of ImageIcons that I
I have an application that stores images in a database. Now I have learned
I have stored images from the net like this Documents/imagecache/domain1/original/path/inURI/foo.png Documents/imagecache/domain2/original/path/inURI/bar.png Documents/imagecache/... Documents/imagecache/... Now

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.