Keep in mind that if you attempt to close a browser window in script code that your code did not open originally, the browser will prompt the user if it's okay to close the window before it will actually close. This is one of the security features of IE but other browsers do similar things as well.
Have fun,
-B
>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