blazor-devexpress-dot-blazor-dot-dxfileinput-729f7ec3.md
Specifies the caption of the built-in select button.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public string SelectButtonText { get; set; }
| Type | Description |
|---|---|
| String |
The caption of the built-in select button.
|
The select button invokes the Open dialog. In this dialog, users can select files that the File Input component should upload. Specify the SelectButtonText property to change this button’s caption:
<DxFileInput FilesUploading="OnFilesUploading" SelectButtonText="Select My File" />
@code {
async Task OnFilesUploading(FilesUploadingEventArgs args) {
foreach (var file in args.Files) {
/* The following code is intended for demonstration purposes only.
Do not read a stream directly in memory to avoid performance and security-related issues. */
using var stream = new System.IO.MemoryStream();
await file.OpenReadStream(file.Size).CopyToAsync(stream);
}
}
}
You can disable the ShowSelectButton property to hide the built-in select button or specify the ExternalSelectButtonCssSelector to implement an external select button.
See Also