Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Formatting text string in Blazor DialogService pop-up

$
0
0

I have some code like this, in the razor view there is only <DxDialogProvider/> and no other markup related to this.

I for the life of me cannot get this dialog to format text with \n or HTML. I have tried various things but no matter what \n is ignored and HTML elements are not interpreted as HTML.

The result is one long unbroken text with html like this: i am <br> not broken up<br> at all. Using DexExpress but afaict this is the same for vanilla Blazor.

string orderSummary = $"<br>Banana: {_vm.CustomerBanana}<br>Delivery date: {_vm.DeliveryDate}<br>Price: {_Price}<br>Items: {_items}";if (DialogService != null){    Result = await DialogService.ConfirmAsync(new MessageBoxOptions()    {        Text = $Confirm? {orderSummary}",        OkButtonText = "Yes",        CancelButtonText = "No",        ShowIcon = false,        ShowCloseButton = false,        RenderStyle = MessageBoxRenderStyle.Success,    });}if (Result == true){    await Send();}

}


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>