Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2 webform questions
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00675854
Message ID:
00676153
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Kirk,

I response to #2 below here is the code to close the browser from a button:
Private Sub Button1_Click
(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles Button1.Click
   ' perform other server side tasks here
   Response.Write("<script>window.close();</script>")
End Sub
As far is #1 is concerned, session end happens in the server without any user request. So there is no object at all for you to redirect or Transfer, or anything that's related to a client request.


>#1: How can I detect when a session expires, and then move the user to a page that shows the session has expired? I put the following code in the global.asax file:
>
>
>    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
>        ' Fires when the session ends
>        Server.Transfer("SessionExpired.aspx")
>    End Sub
>
>
>But nothing ever happened. I haven't changed any default settings and I think I read that by default the session expires after twenty minutes.
>
>
>#2: Kinda of related. Is it possible to close the browser? For example. I have a employee screen. If they click the logoff button I'd like to close the browser. Right now I send them back to the login in screen.
>
>Thanks
>Kirk
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform