使用ASP返回一个图像,而不是.NET [英] Return an image using ASP, not .NET

查看:98
本文介绍了使用ASP返回一个图像,而不是.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用传统的ASP我如何从一个查询返回的图像。

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">

在哪里GetImage.ASP将记录传递的详细信息,并返回一个透明的GIF。

Where GetImage.ASP would record the passed details and return a transparent GIF.

推荐答案

使用response.binarywrite给出一个形象在你的getimage.asp的输出。如果存储图像在数据库中的BLOB,或者从文件中读取图像,得到它在流和使用的BinaryWrite方法的响应发送。

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.

您可以看到这个帖子:<一href=\"http://stackoverflow.com/questions/2481067/classic-asp-display-jpg-using-response-binarywrite\">http://stackoverflow.com/questions/2481067/classic-asp-display-jpg-using-response-binarywrite

这篇关于使用ASP返回一个图像,而不是.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆