在VB.NET中用于浏览文件的控件是什么 [英] What is the control that is using to browse file in VB.NET
本文介绍了在VB.NET中用于浏览文件的控件是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此声明
Openfiledialog()
出错
take an error
DialogResult.OK
用于网络应用程序的正确控件是什么...
我尝试过:
what is the correct control that use for web app ...
What I have tried:
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim fd As New Openfiledialog()
Dim strFileName As String
fd.Title = "Open File Dialog"
fd.InitialDirectory = "C:\"
fd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"
fd.FilterIndex = 2
fd.RestoreDirectory = True
If fd.ShowDialog() = DialogResult.OK Then
strFileName = fd.FileName
End If
End Sub
推荐答案
对于ASP.Net应用程序,您可以使用 FileUpload [ ^ ]
以下是一些关于如何使用的教程使用这个 -
ASP.NET快速入门教程 [ ^ ]
在ASP.NET 2.0中上传文件 [ ^ ]
希望,它有助于:)
For ASP.Net applications you can use FileUpload[^]
Here are few tutorials on how to use this-
ASP.NET QuickStart Tutorials[^]
Uploading Files in ASP.NET 2.0[^]
Hope, it helps :)
这篇关于在VB.NET中用于浏览文件的控件是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文