[dba-VB] ASP.NET 2.0 - Displaying image from memory on WebImageControl

Doug Murphy dw-murphy at cox.net
Tue Jun 3 10:54:34 CDT 2008


Hello Shamil,

I am not familiar with the subject but was looking at chart controls for use
in aspx pages the other day and skimmed this article,
http://aspnet.4guysfromrolla.com/articles/072507-1.aspx, that discussed a
similar technique for putting chart images on web pages without actually
creating an image file on the server.  It may be of some use.

Doug 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Monday, June 02, 2008 9:08 PM
To: 'Discussion concerning Visual Basic and related programming issues.'
Subject: Re: [dba-VB] ASP.NET 2.0 - Displaying image from memory on
WebImageControl

Hi All,

Here is the solution on my test site -
http://shamils-4.hosting.parking.ru/Pics : as it's written in the article
referred below to show a picture on ASP.NET Image control one has to create
special helper .aspx page and pass to this page a parameter defining the
source of the image - the latter could come from anywhere (file, database,
external source (e.g. web service) etc.) or even be generated using
System.Drawing...

...generated image is converted into array of bytes and then it's returned
as binary stream within helper .aspx page...

...that sounds tricky but it works and I didn't find any less complicated
solution - if anybody knows/will find another solution, which uses somehow
an instance of HttpRequest/HttpResponse manually (in custom code) created
and filled with an image bytes' stream - that would be useful here...

Thank you.

--
Shamil



-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Sunday, June 01, 2008 12:23 PM
To: 'Access-D - VB'
Subject: [dba-VB] ASP.NET 2.0 - Displaying image from memory on Web
ImageControl

Hi All,

In ASP.NET 2.0 VB.NET or C# I wanted to load and image from a file (or get
it downloaded/streamed it from somewhere but into memory) and then display
it on an Image control *without write it to file*.

I have found this sample
(http://programming.top54u.com/post/Asp-Net-Display-Image-from-Database.aspx
), which gets image from db and displays them on Image control in a grid: I
think I can adapt it to my case but if somebody can point m eon ready to use
sample fitting my certain case I'd be very pleased to get it and to reuse...

Thank you.

--
Shamil

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list