Return an image using ASP, not .NET

a 夏天 提交于 2019-12-23 13:14:13

问题


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 and return a transparent GIF.


回答1:


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



来源:https://stackoverflow.com/questions/3499590/return-an-image-using-asp-not-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!