如何在asp.net中为fileupload控件赋值 [英] How to assign value to fileupload control in asp.net

查看:372
本文介绍了如何在asp.net中为fileupload控件赋值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何使用c#在asp.net的代码视图中为fileupload控件指定默认值。



数据库中有一个图像路径。我希望在检索时显示FileUpload文本中的路径。



再见

Hi,

How to assign default value to fileupload control in code view in asp.net with c#.

There is an image path in database. I want show that path in FileUpload text at the time of retrieval.

Bye

推荐答案

请参阅此链接:



http://forums.asp.net/ t / 1615510.aspx [ ^ ]
Refer this link:

http://forums.asp.net/t/1615510.aspx[^]


据我所知,你不能。对不起,那就是 FileUpload 控制的方式。它希望用户使用它的浏览按钮选择文件。



但是,如果他们是任何人,你可能会尝试在Google上找到解决方法。



Google搜索结果
As per my knowledge you can not. Sorry but thats how FileUpload control is. It expects Users to select File using it''s "Browse" button.

However you may try to find out work around for this on Google if their is any.

Google Search Result


由于浏览器的安全性,这是可以防止的。



查看此

http://forums.asp.net/t/1435276.aspx [ ^ ]
due to browser security, this is prevented.

Check this
http://forums.asp.net/t/1435276.aspx[^]


这篇关于如何在asp.net中为fileupload控件赋值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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