I need to track when a file link is clicked on so I built a server side function that writes to a SQL DB when an anchor tag is clicked. It's not firing or opening 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());
}