Skip to main content
A newer version of this page is available. .

UploadHttpRequestInfo.ResponseText Property

Returns the response text received from the server.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.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 demonstrates how to use 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