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

Best way to download a file in radzen blazor [closed]

$
0
0

What would be the best approach to create a download button in radzen?

I found some solutions for this in the internet, they work, but none of them seems good for me.One solution would be to create a rest endpoint which just returns the file, which you want to download. This endpoint can then be called directly within C#, which triggers a download.

Another solution would be to use javascript, creating a <a> tag, setting the href attribute to the filepath and simulating a click event on it.

As you can see those solutions are all kind of handicrafted and there seems to be no best practice for this.

Is this the case? Or am i missing something?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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