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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:52:34+00:00 2026-06-16T04:52:34+00:00

My Table in the Database contains a column with a type : image. I

  • 0

My Table in the Database contains a column with a type : image.

I have managed to upload the image to the database.

But almost all tutorials out there, shows us how to give the Image Controller a URL which contains the name of the page, plus a parameter that has the ID of the selected row in the Database

Example:

//Database codes here... (query..etc..)
SqlDataReader myReader = myCommand.ExecuteReader();
if (myReader.HasRows == true)
{
    myReader.Read();
    Response.ContentType = "image/jpg";
    Response.BinaryWrite((byte[])myReader[0]);
    Image1.ImageUrl="User.aspx?imgid=1";
}

So when I click on a specific button which should fetch this image from the database, then give that URL to the image, the image opens in full screen.. But I don’t want that, let’s say I have empty space in my page for an Image of 50px width and 50px height, how can I show the image inside this space? and keeping all the other contents? just like a user page, a profile page.

  • 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-16T04:52:35+00:00Added an answer on June 16, 2026 at 4:52 am

    It’s usually far easier and less error-prone to store your images in the file-system and refer to your images in the database using the filenames of your images.

    I’ve never come across a good reason to store images in a database.

    Also, when you want to edit your image that’s stored in the database, then you are going to have to export it out of your database and then reimport it back in.

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

Sidebar

Related Questions

I have a database table that contains a column named type. For every row
we have a table in an Oracle Database which contains a column with the
i have a large mysql database table in which one column contains values ranging
In my Sybase 12.0 ASE database, I have at table that contains a column
I retrieve a table from the database that contains a column of type time
I have a database table which contains an ID column and a Name column.
I have one database table which contains 8 columns. One of the columns is
I have a database table TravelRequest that contains, amongst other things, the fields SignOffName
I have a table, which contains many columns of float data type with 15
I need to select rows from database table using filtering by xml-type column. table

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.