我们如何使用按钮单击浏览文件 [英] how can we browse a file using button click

查看:123
本文介绍了我们如何使用按钮单击浏览文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在vb中使用asp.net4.0.我想在内容占位符中的click.this按钮中浏览文件.我该如何浏览?请帮助我............

i am using asp.net4.0 with vb. i want to browse a file in the button click.this button in the content place holder. how can i browse it? please help me............

推荐答案

Yuo可以使用工具箱中标准标记下的文件上传控件来做到这一点. /> 例如,遵循此代码.
//在button1_click中的代码

Yuo can do it by using fileupload control available in the toolbox under standard tag.
for example follow this code.
//code in button1_click

if fileupload1.hasfile==true then
dim path as string
//where images is the folder where you want to locate the file
path="images"&filupload1.filename
fileipload1.saveas(server.mappath(path))

end if



希望对您有用.



hope it is useful to you.


请参阅此....

简单的Web文件管理器 [
refer This....

Simple Web File Manager[^]


这篇关于我们如何使用按钮单击浏览文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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