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?