好的,我有一个应用程序,我想记录用户使用该应用程序所花费的时间。目前我正在使用会话和cookie等录制所有内容。但是,如何在不显示计时器的情况下启动计时器,然后在用户按下按钮说明它们已完成时结束计时器。这是一些代码。谢谢!
// get the time spent
DateTime timeSpent = Convert.ToDateTime(Application["timeSpent"])
protected void Application_Start(object sender, EventArgs e)
{
Application["timeSpent"] = 0;
}
如何在用户不知情的情况下触发此计时器等等。谢谢!