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


V

v.anupama

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.
 
Ad

Advertisements

K

Kevin Spencer

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.
 
K

Kevin Spencer

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.
 
V

VB newbie

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.
 
K

Kevin Spencer

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.
 
Ad

Advertisements

L

Laurent Bugnion

Hi,

VB said:
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
 
Ad

Advertisements


Top