User file download tracking RRS feed

  • Question

  • User-794087952 posted

    Hello !

    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.

    Thursday, April 22, 2010 11:12 PM


  • 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

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 22, 2010 11:57 PM