Teemu i tried putting in a
Response.Write and it fires!
Bu the FormsAuthentication.SignOut() doesn't fire:(
My UserControl class looks like this below thanks:-
Imports System.Web.Security
Public MustInherit Class C_Header
Inherits System.Web.UI.UserControl
Protected WithEvents cmdSignOut As
System.Web.UI.HtmlControls.HtmlInputButton
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Sub SignOut(ByVal objSender As Object, ByVal objArgs As EventArgs) Handles
cmdSignOut.ServerClick
'delete the users auth cookie and sign out
FormsAuthentication.SignOut()
'redirect the user to their referring page
'Response.Redirect(Request.UrlReferrer.ToString())
'Response.Write("hello")
End Sub
End Class
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:es**************@TK2MSFTNGP09.phx.gbl...
Is there anything special how you have the UC on the Page? Is it perhaps a
dynamical control?
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke