Dynamically getting images from Database and displaying on ASP.Netpage

  • Thread starter Thread starter asharda
  • Start date Start date
A

asharda

Hi,

I have an ASP.Net application with the back-end as VB.Net. I have a
combo control and on the selection changed event of the combo control
I need to get the selected image from the database and display it on a
Image control on the asp.net page.

I get the image from the db as a byte array. Can anyone please help,
as to how to show the image on the page in that image control?

Thanks for your time in advance.
 
Hi,

I have an ASP.Net application with the back-end as VB.Net. I have a
combo control and on the selection changed event of the combo control
I need to get the selected image from the database and display it on a
Image control on the asp.net page.

I get the image from the db as a byte array. Can anyone please help,
as to how to show the image on the page in that image control?

Thanks for your time in advance.

Why are you storing the image in the database instead of on a file
server?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
Well it is a requirement to store the images in the database

But why the requirement? Is it worth sacrificing performance and
scalability? How many images are in the database (all of your site's
or just a few)? Are you allowed to cache the images after they're
retrieved the first time?

I know that doesn't answer the question you originally asked, but
storing binary data into a database should be something that's
questioned and not done on a whim. You can quickly clog up your site
with all the cross server talk and data accessing that will happen
(especially if you aren't caching the images).

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
But why the requirement? Is it worth sacrificing performance and
scalability? How many images are in the database (all of your site's
or just a few)? Are you allowed to cache the images after they're
retrieved the first time?

I know that doesn't answer the question you originally asked, but
storing binary data into a database should be something that's
questioned and not done on a whim. You can quickly clog up your site
with all the cross server talk and data accessing that will happen
(especially if you aren't caching the images).

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/- Hide quoted text -

- Show quoted text -

Actually, just found out that I don't have to store the images on the
database and can store it on the server so I guess that makes my like
simpler.

Thanks
 
Back
Top