本文介绍了在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
推荐答案
这篇关于在VB.NET中用于浏览文件的控件是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!