How to let users login to my site using SoundCloud

I want to let users authenticate via SoundCloud for my ASP.NET MVC 4 project. Since there is no .NET SDK, I wrote a custom OAuth2Client to handle the authentication. After adding the client to my AuthConfig.cs, it appropriately showed up as an option to login. The problem is, when I click on the button to login, it always returns

How do I detect which button was clicked on “save/open/cancel” dialog?

I got a webpage where members can download different kind of files on. I wan’t to get information about which files and how many times each member have downloaded. when the user want to download a file he get browser pop-up where he gets 3 choises: “Open”, “save” and “Cancel”.(file dialog box in browser). i want to update the download status only if open/save button is clicked