how to: session

I am a bit familiar with ASP.NET session where it can be set the timeout in case the user is in idle.

In XOJO, how it was implemented?

I want to disconnect the session in case the user has no activity for a period of time.

Please guide me.

Thank you!

WebSession.Timeout
You should consider using the search field on the docs next time :slight_smile:

Thanks!So there is.

But where to put this setting in XOJO program?

I hope you can provide me where to find useful source on how to use it effectively.
Please.

From the documents

[quote]This example is in the Open event of the WebSession.

Self.Timeout = 30

[/quote]

Yes. I read the document. But there is no example there.

where to put “Self.Timeout = 30” ?

As Chao said, in the Open event of Session for example :slight_smile:
You find Session in the navigator on the left side of the IDE.

You can actually put it anywhere. The trick is that you also need to implement the Session.TimedOut event. That event will fire when there has been no activity on the browser for the specified time.

For instance, you may not want to set the Timeout property until after the user actually logs in…

Also check out Examples/Web/SessionTimeout.