如何在按钮单击时打开“浏览文件”对话框。 [英] How to Open Browse File dialogue box on button click.
本文介绍了如何在按钮单击时打开“浏览文件”对话框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的任务是点击一个简单的asp:按钮打开文件浏览窗口/对话框。
稍后当选择任何文件时,文件的URL显示在asp中:文本框由asp:按钮。
这与asp:fileupload控件相同但是它自定义生成一个
控制如下
< asp:button /> - >点击 - >打开浏览窗口
< asp:textbox /> - >关于选择 - >文件路径
感谢您的支持。
My task is to open the file browse window/dialogue box on click of a simple asp:button.
Later on when any file is selected the URL of the file is displayed in the asp:textbox by the asp:button.
This is same as asp:fileupload control but its custom generated one
Controls are as follows
<asp:button/> -> On Click -> Open Browse Window
<asp:textbox/> -> On Selection -> Path of File
Thanks for your support.
推荐答案
试试这个..
Try this..
If OpenFileDialog1.ShowDialog = DialogResult.OK Then
txtfilename.Text = OpenFileDialog1.FileName
End if
推荐
http://www.uploadify.com/demos/ [ ^ ]
这篇关于如何在按钮单击时打开“浏览文件”对话框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文