Last post Apr 22, 2010 11:57 PM by ignatandrei
Apr 22, 2010 11:12 PM|2.0 turbo|LINK
I'm making an electronic library project with asp.net 2.0. I have a books table in my database, as well as standard asp.net membership tables.
User can login to the library website and download a book from a gridview. How can I track which user which book downloaded ?
I'm using Table Adapters and Data Access Layers.
Apr 22, 2010 11:57 PM|ignatandrei|LINK
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