blazor-devexpress-dot-blazor-dot-dxupload-babbc7be.md
Specifies the select button’s text.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public string SelectButtonText { get; set; }
| Type | Description |
|---|---|
| String |
The text displayed in the select button.
|
The Upload displays the Select File button that invokes the open file dialog. Use the SelectButtonText property to change this button’s text.
<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/Upload/"
SelectButtonText="Select My File">
</DxUpload>
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace BlazorDemo.AspNetCoreHost;
[Route("api/[controller]")]
[ApiController]
public class UploadController : ControllerBase {
[HttpPost("[action]")]
public ActionResult Upload(IFormFile myFile) {
try {
// Write code that saves the 'myFile' file.
// Don't rely on or trust the FileName property without validation.
} catch {
return BadRequest();
}
return Ok();
}
}
To hide this button, set the ShowSelectButton property to false.
You can also use the ExternalSelectButtonCssSelector property to implement an external select button.
See Also