A newer version of this page is available. Switch to the current version.

ASPxUploadControl.GetRandomFileName(Int32) Method

Returns a random name generated for the uploaded file specified by its index.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll


public string GetRandomFileName(
    int index
Public Function GetRandomFileName(
    index As Integer
) As String


Name Type Description
index Int32

An integer value that specifies the index of the corresponding uploaded file within the UploadedFile collection.


Type Description

A String value representing a random file name.


Sometimes, the uploaded file's client name, which can be obtained via the UploadedFile.FileName property, may not suit your application's requirements. In this case, you can call the GetRandomFileName method to generate a random name for the uploaded file with specified index. The generated file name can be used when saving the file via the UploadedFile.SaveAs method.

See Also