文件夹中的图像显示 [英] Image display from a folder

查看:69
本文介绍了文件夹中的图像显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

我正在尝试为管理员创建一个页面,以查看特定用户在申请表中输入的详细信息.如何在aspx页面中显示上载到文件夹的图像?图像的路径存储在数据库表中请帮助我..

Hai,

I am trying to create a page for administrator, to view the details entered by a particular user in an application form.How can I display the images uploaded to a folder in an aspx page?The paths for the images are stored in a database table.Please help me..

推荐答案

使用asp:image控件并为imageurl属性提供图像路径.!!!
Use An asp:image control and give ur image path to the the imageurl attribute.!!!


更好地使用HTML标记

如果需要在单击用户名后获取,然后将查询字符串发送到其他页面,然后在触发查询后获取图像的路径并将其设置在img标签中,如下所示:

better to use HTML tag

if requirement is to get after clicking on username then send a querystring to other page and then after firing a query get the path of the image and set it in img tag like below:

<img alt="" src="<%=ds.tables[0].rows[0]['photo'].tostring()%>" />


HI ..

是的,这非常正确,可以显示我们拥有asp:image控件的图像,但是我想让您知道的2个主要内容是

1)要显示图像,必须将图像放置在根文件夹中.
2)如果您的图像不在根文件夹中(意味着在解决方案中),或者您正在从解决方案外部的物理位置访问您的图像,则图像将不会显示.在这种情况下,您必须使用binarystreming对象来显示图像

希望对您有帮助

谢谢
HI..

Yes this is very correct to show the images we have asp:image control but 2 main thing i want to let you know that are

1)To show the images you have to place the images inside the root folder.
2)If your images are not present in the root folder(means in solution) or you are accessing youe images from the physiacl location outside the solution,images will not display.in this condition you have to use the binarystreming object to display the images

Hope it will help you

Thanks


这篇关于文件夹中的图像显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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