如何从计算机的不同驱动器中获取图像。 [英] How to fetch image from different drive of the computer.

查看:61
本文介绍了如何从计算机的不同驱动器中获取图像。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好先生,我正在处理Web应用程序,我想在数据库中显示来自C盘中文件夹的图像。而且我只从数据库中获得动态值图像名称。那我怎么能显示那个文件夹。

Hello Sir , i'm working on the web application nd i want to show image in datalist from the folder which is in the C drive. and i've dynamic value from the database only image name. then how can i show that fro that folder.

推荐答案

HI


如果你在本地机器上工作那么你就是使用动态数据附加路径(C:\\ folder),例如

HI
If you are working on local machine then you just append the path(C:\\folder) with dynamic data like
<asp:Image ID="Image3" runat="server"ImageUrl='C:\\barcode<%# Eval("AppNo")+ %>.gif' Width="110px" Height="30px" />



如果您正在使用服务器,那么您必须创建文件夹虚拟目录,然后将其附加到路径上,例如


if you are working on server then you have to make the folder virtual directory and then append it on the path like

<asp:Image ID="Image3" runat="server"ImageUrl='/barcode/<%# Eval("AppNo")+ %>.gif' Width="110px" Height="30px" />





希望你能得到它。



Regard

Ehsan



Hope you got it.

Regard
Ehsan


先生,我正在使用它:< asp:image id =Image3runat =serverimageurl =<%#。gif =%> width =110pxheight =30pxxmlns:asp =#unknown>



错误:服务器标签格式不正确。
Sir I'm using this :<asp:image id="Image3" runat="server" imageurl="<%# " .gif=" %>" width="110px" height="30px" xmlns:asp="#unknown">

Error:The server tag is not well formed.


这篇关于如何从计算机的不同驱动器中获取图像。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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