检索在一个aspx页面中上传到另一页面的图像. [英] Retrieving image uploaded in one aspx page to another.

查看:121
本文介绍了检索在一个aspx页面中上传到另一页面的图像.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我需要将一些在一个aspx页面中上传的图像显示到另一个页面中,即,用户正在输入其个人详细信息并以申请表的形式上传其照片,身份证副本,pancard副本等.管理员需要查看所有详细信息用户在另一页中输入的内容.我正在获取显示的用户输入的所有凭据,但他上传的图像除外.但是我在调​​试时获取了正确的ImageUrl.请任何人帮助我显示图像.我是的初学者asp.net开发.我正在使用以下代码片段来显示图像.

Hi,
I need to display some images uploaded in one aspx page into another.ie.,the user is entering his personal details and uploading his photo,id card copy,pancard copy ,etc in an application form .The administrator needs to view all the details entered by the user in another page.I am getting all the credentials entered by the user displayed except the images uploaded by him.But i am getting the correct ImageUrl while debugging.Anybody please help me to display the images.I am a beginner in asp.net development.I am using the following code snippet for displaying the image.

Updatepanel1.Visible=true;
Image1.ImageUrl=c.dr.GetValue(16).ToString();
Image1.Visible = true;



//c是声明连接字符串的类对象.
//div是SqlDataReader对象.



//c is class object where connection string is declared.
// dr is SqlDataReader object.

推荐答案

Image1.ImageUrl"com_addressproof \ 01.JPG";
您如何确定这是正确的URL?您看到的是带有十字的小矩形吗?如果是这样,那么这可能是形成相对路径的常见问题.

我建议您使用此技巧并在设置图像源之前正确解析路径:
Image1.ImageUrl "com_addressproof\01.JPG";
How are you sure this is the right URL? Are you seeing a small rectangle with a cross? If so, then this might be the common issue of relative path formed.

I would suggest you to use this Tip and resolve the path correctly before setting the image source: Resolving Paths in a Multi-Folder WebSite[^]


这篇关于检索在一个aspx页面中上传到另一页面的图像.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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