Skip to main content

UploadHttpRequestInfo.ResponseText Property

Returns the response text received from the server.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public string ResponseText { get; }

Property Value

Type Description
String

The response text.

Remarks

When you handle an asynchronous request, the ResponseText property’s text can be incomplete.The complete text is received when the Status property returns 200 ("OK").

The following example uses this property in the FileUploadError event handler:

<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/UploadFile/"
          FileUploadError="@OnUploadError">
</DxUpload>
<div class="alert alert-danger @(ErrorVisible? " visible" : " invisible")">@MyError</div>

@code {
    bool ErrorVisible { get; set; } = false;
    string MyError { get; set; }

    void OnUploadError(FileUploadErrorEventArgs e) {
        MyError = e.RequestInfo.ResponseText;
        ErrorVisible = true;
        InvokeAsync(StateHasChanged);
    }
}

File Upload Error

See Also