如何使用Windows默认图像查看器显示图像而不是浏览器 [英] how to show image with windows default image viewer not with browser

查看:219
本文介绍了如何使用Windows默认图像查看器显示图像而不是浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此代码段将图像发送到客户端:

i am using this code snippet to send an image to client:

Response.ContentType = "image/jpeg";
Response.TransmitFile(Server.MapPath ( @"~\photo.jpeg"));
Response.End();



但是浏览器会自动显示它。

如何使用默认图像查看器而不是浏览器打开它?


but the browser shows it itself.
how can i make it open with default image viewer instead of browser?

推荐答案

我不确定您是否可以,无需编写activex控件或某些特定的浏览器插件。您已将文件发送到客户端,现在客户端的PC将确定打开它的内容。如果他们在MAC或Linux上怎么办?或者,如果他们使用手机或平板电脑。他们不一定会使用Windows。你必须在网络编程方面更加灵活。
I am not sure that you can, without writing an activex control or some specific browser plugin. You have sent the file to the client and now it is the client's PC that will determine what opens it. What if they are on a MAC or Linux? Or if they use a phone or tablet. They won't necessarily be using Windows. You have to be more flexible in web programming.


这篇关于如何使用Windows默认图像查看器显示图像而不是浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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