I need to track when a file link is clicked, so I built a function on the server side that writes to SQL DB when I click on the anchor tag. It does not shoot or open the file. Here is my code:
HTML
<a href="pdf/Access2013.pdf#zoom=100" runat="server" onServerClick="AccessFile_Click" target="_blank"><img src="img/pdf_icon.png" border="0" /></a>
SERVER CODE
protected void AccessFile_Click(object sender, EventArgs e) { App_Code.bi.LogFileDownload("Access File", Session["UserID"].ToString()); }
source share