Button in UserControl Question

P

Patrick.O.Ige

The SignOut() button below doesn't fire if in a UserControl but if i move it
to an ASPX page it fires..
It seems i can't get access to the SUB in the USERCONTROL.
Am i missing something?
Any ideas?


I have a userControl below:-
----------------------------
<%@ Control CodeBehind="_Header.ascx.vb" Language="vb"
AutoEventWireup="false" Inherits="Test.C_Header" %>
<td align="center" width="65">
<input id="cmdSignOut" type="submit" Value="Sign Out"
runat="server" onserverclick="SignOut"
NAME="cmdSignOut">


In usercontrol codebehind i have:-
---------------------------------
Protected WithEvents cmdSignOut As
System.Web.UI.HtmlControls.HtmlInputButton
Sub SignOut(ByVal objSender As Object, ByVal objArgs As EventArgs) Handles
cmdSignOut.ServerClick

'System.Web.Security.FormsAuthentication.SignOut()
'Response.Redirect(Request.UrlReferrer.ToString())
'Response.Write("asdsadas")
Response.Redirect("logout.aspx")
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top