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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:56:46+00:00 2026-05-31T15:56:46+00:00

I have images in the database (SQlServer 2008 R2) in a varbinary column. My

  • 0

I have images in the database (SQlServer 2008 R2) in a varbinary column. My report is developed in ASP.net 3.5 in Visual Studio 2010. On my report in a table, I use an Image, set the MIME type to image/jpeg, image source as Database & the image is displayed correctly in the report. Everything works!! Now my issue is that, I would like to add a hyperlink to that image so that when the user clicks on the image it opens in another window/tab in its original format. This will help the user to get a closer look at the image.
I tried to add Hyperlink – Go to URL – Expression

=”http://localhost:49170/MtkMobileDeposit_FailedTransaction/Account/ReportByUserName.aspx?BackImageOriginal=” & Fields!BackImageOriginal.Value

But I cannot get it to display only the image. Instead it displays the entire report in a new tab. How do I first get the URL for the images to work ? Please help.

Thanks,
sdd

  • 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-31T15:56:48+00:00Added an answer on May 31, 2026 at 3:56 pm

    Your best bet is to use a httphandler to process your request.

    Create an ImageHandler.ashx that will take in the record id. Then you can get the image’s byte array and out put it to the screen.

    Your new URL will look like

    “/ImageHandler.ashx?Record_ID=” & Fields!RecordId.Value

    public class ImageHandler : IHttpHandler
    {
    
        public int Record_ID
        {
            get { return Convert.ToInt32(HttpContext.Current.Request.QueryString["Record_ID"]); }
    
        }
    
        public void ProcessRequest(HttpContext context)
        {
            // get image from database into a byte array
            Component.ImageController objImageController = new Component.ImageController();
            Component.ImageInfo objImageInfo = objImageController.getImage(Record_ID);
            byte[] byteArray = objImageInfo.photo;
    
            // output it to the screen
            context.Response.Clear();
            context.Response.ContentType = "image/jpeg";
            context.Response.BinaryWrite(byteArray);
    
            context.ApplicationInstance.CompleteRequest();
    
        }
    
    
    
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using Visual Studio 2008 (VB.Net) and SQL Server 2008. I have
Basically I have a database with two tables, that is, Updates table and Images
I have links of images in my database e.g.-http://accessories.us.dell.com/sna/images/products/large/330-5288.jpg above link of an image
I have fetched images and text as listview from database.now on clicking the particular
I have these images that I am getting off my server and a database
I have an application that stores images in a database. Now I have learned
I have a controller in MVC serving up images from a database. EDIT: This
I have a grid of UIImageViews. The images names come from a sqlite3 database.
what's the proper way to display an image (bitmap) stored in sqlserver 2008 database
Recently I have been watching Plural Sight ASP.NET videos on data binding, and I

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.