Using the FileUpload control and curious if I can restrict the filename to be a certain name?
Basically ###.pdf, where I will know the number of the file they should be uploading. Also when the control pops up for the "Upload" any way of limiting it to only 1 "Select" box, No "Add"
Basically ###.pdf, where I will know the number of the file they should be uploading. Also when the control pops up for the "Upload" any way of limiting it to only 1 "Select" box, No "Add"
<
telerik:RadFileExplorer
runat
=
"server"
ID
=
"FileExplorer1"
Width
=
"520px"
Height
=
"300px"
>
<
Configuration
ViewPaths
=
"~/PDF/ECPay"
UploadPaths
=
"~/PDF/ECPay"
DeletePaths
=
"~/PDF/ECPay"
AllowFileExtensionRename
=
"True"
></
Configuration
>
</
telerik:RadFileExplorer
>
Code Behind
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim iASI_Num As Integer = Request("ASI_Num")
'set properties according to configuration panel
FileExplorer1.Configuration.SearchPatterns = New String() {"*.pdf"}
FileExplorer1.VisibleControls = GetVisibleControls()
FileExplorer1.EnableOpenFile = True
FileExplorer1.DisplayUpFolderItem = False
FileExplorer1.AllowPaging = False
FileExplorer1.EnableCreateNewFolder = False
FileExplorer1.Configuration.AllowFileExtensionRename = False
If (FileExplorer1.VisibleControls And Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid) = 0 Then
FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Thumbnails
End If
If (FileExplorer1.VisibleControls And Telerik.Web.UI.FileExplorer.FileExplorerControls.ListView) = 0 Then
FileExplorer1.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.[Default]
End If
FileExplorer1.Configuration.UploadPaths = New String() {"~/PDF/ECPay"}
FileExplorer1.Configuration.DeletePaths = New String() {"~/PDF/ECPay"}
End Sub
Protected Function GetVisibleControls() As Telerik.Web.UI.FileExplorer.FileExplorerControls
Dim explorerControls As Telerik.Web.UI.FileExplorer.FileExplorerControls = 0
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.AddressBox
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Grid
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.ListView
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.Toolbar
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.TreeView
explorerControls = explorerControls Or Telerik.Web.UI.FileExplorer.FileExplorerControls.ContextMenus
Return explorerControls
End Function
End Class