Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   How to Display an image, from a DB, into the Gridview (ASP.NET 2.0) (http://www.velocityreviews.com/forums/t778025-how-to-display-an-image-from-a-db-into-the-gridview-asp-net-2-0-a.html)

Auto 04-27-2006 07:13 AM

How to Display an image, from a DB, into the Gridview (ASP.NET 2.0)
 
Hello,

I would like to know how do display an image into a Gridview (ASP.NET 2.0)
taken directly from a DataBase, NOT using an URL, like described in this
article:

http://msdn.microsoft.com/library/de...idViewEx06.asp

I have NO URL, i have the binary image inside the DB, like the field "Photo"
in the table "Employees" of the "NWIND.MDB" DataBase.
Any hints?

Thanks,
Auto.



vMike 05-02-2006 07:21 AM

Re: How to Display an image, from a DB, into the Gridview (ASP.NET 2.0)
 

"Auto" <auto@auto.it> wrote in message
news:u69qQocaGHA.3524@TK2MSFTNGP04.phx.gbl...
> Hello,
>
> I would like to know how do display an image into a Gridview (ASP.NET 2.0)
> taken directly from a DataBase, NOT using an URL, like described in this
> article:
>
> http://msdn.microsoft.com/library/de...idViewEx06.asp
>
> I have NO URL, i have the binary image inside the DB, like the field
> "Photo"
> in the table "Employees" of the "NWIND.MDB" DataBase.
> Any hints?
>
> Thanks,
> Auto.
>
>

You would set the ImageUrl to another aspx file like
getpicture.aspx?picture=1234 and in that page you would use
system.drawing.image to get the stream from the database and then save it to
the response.outputstream. There are some examples floating around. There
are a lot of things you can do inside that process also like resize, add
text, crop etc.
Hope this helps.
Mike




All times are GMT. The time now is 08:03 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.