I have an image in asp.net mvc. On the click of the image the image should be downloaded and a counter (counting the number of downloads on the image should be incremented). I have done both of them separately.
However, is it possible to specify more than one url in the href attribute of the image?
I currently have this, image download on the click of the image
<a href="@Url.Content('https://someurl.com')"/>
And the controller action to increment the downloads counter is as follows:
<a href='@Url.Action("ActionName", "ControllerName")/>
Where ActionName is the name of the controller in the ControllerName which updates the increment of the downloads counter.
How can the download and the increment of the downloads counter happen simultaneously? Thanks