Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   <img> tag and resource files for scr-source? (http://www.velocityreviews.com/forums/t757383-img-tag-and-resource-files-for-scr-source.html)

Ole Hanson 01-10-2005 08:16 PM

<img> tag and resource files for scr-source?
 
I want to compile my images into a resource file and then use this for my
<img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
instead of having a list of images on my server...

How can this be accomplished??

Thanks you!

/Ole



Steve C. Orr [MVP, MCSD] 01-10-2005 10:20 PM

Re: <img> tag and resource files for scr-source?
 
You'll need a special page to output these images.
Every <img> tag will need to point to this page.
You page will read the image from the resource file and use
Response.OutputStream.Write method.

This example demonstrates how to do it, except it read from a database
instead of a resource file so it gets you at least half way there.
http://steve.orr.net/content/asp200307so_f.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



"Ole Hanson" <no@spam.com> wrote in message
news:euu1pD19EHA.2196@TK2MSFTNGP11.phx.gbl...
>I want to compile my images into a resource file and then use this for my
><img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
>instead of having a list of images on my server...
>
> How can this be accomplished??
>
> Thanks you!
>
> /Ole
>




Antonio Bakula 01-11-2005 09:06 AM

Re: <img> tag and resource files for scr-source?
 
On Mon, 10 Jan 2005 21:16:45 +0100, Ole Hanson wrote:

> I want to compile my images into a resource file and then use this for my
> <img> tags in my table (<table><tr><img scr=(my resourcefile)</tr></table>;
> instead of having a list of images on my server...
>
> How can this be accomplished??
>


http://www.antoniob.com/projects/PStreamImage.aspx

--
http://www.antoniob.com/
remove antispam XremoveX from e-mail !

Ole Hanson 01-12-2005 01:20 PM

Re: <img> tag and resource files for scr-source?
 
I managed to make this very scenario happen (extracting images from
res-files) by inspiration from this article:
http://www.codeproject.com/aspnet/ressrvpage.asp

Basically you should implement the IHTTPHandler interface and implement the
method ProcessRequest. This will allow you to make a page that emits binary
data instead of html.

Works a charm.

Hope it helps!

/Ole


"Antonio Bakula" <antonioXremoveX@antoniob.com> wrote in message
news:yft0d5z6oizm$.1pty39lv43sv9$.dlg@40tude.net.. .
> On Mon, 10 Jan 2005 21:16:45 +0100, Ole Hanson wrote:
>
>> I want to compile my images into a resource file and then use this for my
>> <img> tags in my table (<table><tr><img scr=(my
>> resourcefile)</tr></table>;
>> instead of having a list of images on my server...
>>
>> How can this be accomplished??
>>

>
> http://www.antoniob.com/projects/PStreamImage.aspx
>
> --
> http://www.antoniob.com/
> remove antispam XremoveX from e-mail !





All times are GMT. The time now is 10:22 PM.

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