Time spent reading a file. ASP.Net (V1.1)

Discussion in 'ASP .Net' started by v.anupama@gmail.com, Apr 25, 2006.

  1. Guest

    I have a requirement where a user can access ONLY one file at any given
    time out of a list of files listed in datagrid (button/hyperlink
    columns). Only files listed are pdf,doc,txt.
    I cannot use shared point etc. this should be a ASP.net application.

    I also need to keep track of how much time a user spent looking at a
    particular file.
    I cannot use window.Showmodaldialog as Response.writefile does not work
    on modal window.

    Is this doable??,
    How to handle: What if a user looses internet connection while
    reviewing a file. etc.

    Can anyone throw some ideas on how to implement this.
    Any help would be greatly appreciated.
     
    , Apr 25, 2006
    #1
    1. Advertising

  2. There really is no reliable way to keep track of the time a user spent
    reading a file. You could use Ajax I suppose with a timer on the client that
    fires a call back to the server, but this only tells you how long the window
    was opened on the client. It doesn't tell you, for example, if the user was
    looking at that window the whole time it was opened.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Hard work is a medication for which
    there is no placebo.

    <> wrote in message
    news:...
    >I have a requirement where a user can access ONLY one file at any given
    > time out of a list of files listed in datagrid (button/hyperlink
    > columns). Only files listed are pdf,doc,txt.
    > I cannot use shared point etc. this should be a ASP.net application.
    >
    > I also need to keep track of how much time a user spent looking at a
    > particular file.
    > I cannot use window.Showmodaldialog as Response.writefile does not work
    > on modal window.
    >
    > Is this doable??,
    > How to handle: What if a user looses internet connection while
    > reviewing a file. etc.
    >
    > Can anyone throw some ideas on how to implement this.
    > Any help would be greatly appreciated.
    >
     
    Kevin Spencer, Apr 25, 2006
    #2
    1. Advertising

  3. Correction: Rather then "window" I shoud have said "document." If the
    document is not HTML, you would have to insert it into a frameset with
    another frame containing the Ajax code.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Hard work is a medication for which
    there is no placebo.

    <> wrote in message
    news:...
    >I have a requirement where a user can access ONLY one file at any given
    > time out of a list of files listed in datagrid (button/hyperlink
    > columns). Only files listed are pdf,doc,txt.
    > I cannot use shared point etc. this should be a ASP.net application.
    >
    > I also need to keep track of how much time a user spent looking at a
    > particular file.
    > I cannot use window.Showmodaldialog as Response.writefile does not work
    > on modal window.
    >
    > Is this doable??,
    > How to handle: What if a user looses internet connection while
    > reviewing a file. etc.
    >
    > Can anyone throw some ideas on how to implement this.
    > Any help would be greatly appreciated.
    >
     
    Kevin Spencer, Apr 25, 2006
    #3
  4. VB newbie Guest

    I am sorry I was not clear in my Question. Infact, I meant "How much
    time a User is keeping the file open, noting down the opening and
    closing times of the Document" and NOT "How much time the User is
    looking at the file". Thanks for the Suggestion, I will try to
    implement that and if someone has more ways of doing it Please let me
    know.
     
    VB newbie, Apr 25, 2006
    #4
  5. The user is not looking at "the file." The user is looking at a downloaded
    *copy* of the file.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Numbskull

    Hard work is a medication for which
    there is no placebo.

    "VB newbie" <> wrote in message
    news:...
    >I am sorry I was not clear in my Question. Infact, I meant "How much
    > time a User is keeping the file open, noting down the opening and
    > closing times of the Document" and NOT "How much time the User is
    > looking at the file". Thanks for the Suggestion, I will try to
    > implement that and if someone has more ways of doing it Please let me
    > know.
    >
     
    Kevin Spencer, Apr 25, 2006
    #5
  6. Hi,

    VB newbie wrote:
    > I am sorry I was not clear in my Question. Infact, I meant "How much
    > time a User is keeping the file open, noting down the opening and
    > closing times of the Document" and NOT "How much time the User is
    > looking at the file". Thanks for the Suggestion, I will try to
    > implement that and if someone has more ways of doing it Please let me
    > know.


    The only more or less reliable way to do that is to use AJAX to
    periodically poll the server, and to note down the time where the poll
    starts. You cannot reliably send an event to the server when the window
    gets closed, or when another document is displayed.

    Additionally, this will fail when JavaScript is blocked on the client
    for some reason, something as simple as an "alert" will stop the web
    methods to be called.

    Use with care...

    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch
     
    Laurent Bugnion, Apr 26, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    0
    Views:
    379
  2. Replies:
    3
    Views:
    457
    Nick Craig-Wood
    Feb 6, 2007
  3. xianwei
    Replies:
    20
    Views:
    719
    Guy Macon
    Sep 29, 2007
  4. lyallex
    Replies:
    8
    Views:
    383
    lyallex
    Oct 27, 2007
  5. John
    Replies:
    1
    Views:
    336
    Krzysiek Zaporowski
    Mar 11, 2008
Loading...

Share This Page