HI..
I am trying to change an image after set a variable
I use this code
<RadzenImage Path='@(@validationres?.Contains("OK") == true ? "images/ok_144.png.png" : "images/no_144.png")'></RadzenImage>
and I have to set the variable to “OK” or “NO” during a formsubmit, but the image is not set
what I am wrong
Hi @Stefano_Carta
What is it you see? Does the image not get set at all? Or is it that the image is set to one of those but doesn’t react to changes in validationres?
Regards
Paul
Thanks for relplay…
i set the first value “NO” on “oninitializeAsync()
and after the page is renderred I see this:
Hi @Stefano_Carta,
I created a working demo here: Playground | Radzen Blazor Components
It shows how to set the Path attribute of RadzenImage conditionally.
I suggest checking what the actual URL requested is (use the browser developer tools).