尝试将图像从 URL 流式传输到浏览器,需要帮助将教程付诸实际操作
主要目标是在浏览器中显示来自 url 的图像。显然,该图像在网络服务器上不可用,或者我只是使用 http://theurl... 。
如果你愿意的话,我找到了一个由两部分组成的“教程”,我认为这对我有用。我只是不知道到底如何让它发挥作用。它缺少一些东西,我不确定这些东西是什么。
我想知道是否有人可以将其放入我可以使用的完整代码隐藏页面中。
第一部分展示如何从 url 加载图像: http://www.vcskicks .com/image-from-url.php
该页面引用了此页面,该页面显示了如何通过网络请求获取文件:http://www.vcskicks.com/download_file_http.php
有人可以帮我将其放在代码隐藏页面中,以及实际调用此代码并显示图像?
The main goal is to display an image from a url in the browser. Obviously the image isn't available on a web server or I'd just use http://theurl....
I have found a two part 'tutorial' if you will, that does what I think will work for me. I just can't figure out exactly how to get this to work. It's missing things and I'm not sure what those things are.
I'm wondering if someone can put this into a complete codebehind page that I could use.
The first part shows how to Load an image from a url: http://www.vcskicks.com/image-from-url.php
And that page refers to this one, which shows how to get the file via an webrequest: http://www.vcskicks.com/download_file_http.php
Can someone help me put this together in a codebehind page, along with a page that actually calls this code and displays the image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信这篇博文正是您所需要的。
http://www.codegolem.com/category/ASPNET.aspx?page=10 正如它
所说,最简单的方法是使用一个假的 aspx 页面,它返回图像,就像其他帖子所做的那样:
http://blogs.msdn.com/b/jrule /archive/2004/08/16/215393.aspx
希望有帮助
I belive this blog post is what you need.
http://www.codegolem.com/category/ASPNET.aspx?page=10
As it says there, the easiest way is to use a fake aspx page that returns the image as this other post do:
http://blogs.msdn.com/b/jrule/archive/2004/08/16/215393.aspx
Hope it helps
对此的要求已经改变,现在需要显示整个 html 页面,而不仅仅是图像。所以我为此提出了一个新问题。
Requirements for this have changed, and now need to display an entire html page, not just an image. So I've opened a new question for that.