Hi,
Look at my code:
All i want is when the user closes the form WITHOUT signing off, to call the Out() routine to delete a file from the server and then FormsAuthentication.SignOut().
If i add a button which calls the Out() everything works; by adding the Out() the the page_unload, the Out() routine is NOT called.
What's wrong ?
Tnx
Look at my code:
Code:
Private Sub Out()
File.Delete(Server.MapPath("./History/") & txtName.Text & ".txt")
FormsAuthentication.SignOut()
End Sub
Private Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Unload
Out()
End Sub
All i want is when the user closes the form WITHOUT signing off, to call the Out() routine to delete a file from the server and then FormsAuthentication.SignOut().
If i add a button which calls the Out() everything works; by adding the Out() the the page_unload, the Out() routine is NOT called.
What's wrong ?
Tnx