User197322208 posted
You have something like :
<a href="id of the file" > Download</a>
modify in <a href="trackdownload.ashx?id=id of the file">Download</a>
now make a table trackdownload : userid, userfile, numberofdownloads
make a http handler(trackdownload.ashx file)
in this http handler increment (or insert) in the table trackdownload a (new) record
then use Response.WriteFile