在asp.net中检索图像 [英] Retrieve an image in asp.net
本文介绍了在asp.net中检索图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何从文件系统中获取asp.net中名为"dddd"的图像并将其显示在网页上?
how can i retreive an image in asp.net called "dddd" from a file system and show it on the web page?
推荐答案
如果该文件位于您的Web应用程序中,则只需使用ImageUrl属性.@Bala R提供了一个很好的例子.
If the file is located in your web app, then just use the ImageUrl property. @Bala R provided a good example.
如果文件位于Web应用程序路径之外,则需要创建一个指向该位置的虚拟目录.
If the file is located outside of the path of your web app then you will need to create a virtual directory that points to that location.
如果您谈论的是客户端计算机上的文件,那么您将根本无法执行此操作.
If you are talking about a file that is on the clients computer, then you can't do this at all.
这篇关于在asp.net中检索图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文