开发者

Return an image using ASP, not .NET

开发者 https://www.devze.com 2023-01-11 16:58 出处:网络
Using traditional ASP how can I return an image from a query. I want to use an image on a web page for tracking purposes, so for example I might have a page containing:

Using traditional ASP how can I return an image from a query.

I want to use an image on a web page for tracking purposes, so for example I might have a page containing:

<img src="../cgi-bin/getimage.asp?user1234&page=1232" WIDTH="1" HEIGHT="1">

Where GetImage.ASP would record the passed details an开发者_如何学运维d return a transparent GIF.


Use response.binarywrite to give an image as an output in your getimage.asp. If you store the image as a BLOB in database, or if you read the image from a file, get it in a stream and send it in the response using binarywrite method.

You can see this post: Display JPEG using Response.BinaryWrite

0

精彩评论

暂无评论...
验证码 换一张
取 消