
compile error on method not having same signature as delagate class
I'm getting an compile error when try to use an asp:imagebutton. I'm not
sure why this is so. Here is the code and compile error.
<asp:ImageButton onClick="LogoutBtn_Click" runat="server" id="logout"
ImageUrl="logout.gif" />
Code behind:
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Public Function LogoutBtn_Click(ByVal sender As Object, ByVal e As
ImageClickEventArgs)
Session.Clear()
Response.Redirect("Logon.aspx")
End Function
I've tried eventArgs as well in place of ImageClickEventArgs and still the
same compile error.
Compile error:
Method 'Public Function LogoutBtn_Click(sender As Object, e As
System.Web.UI.ImageClickEventArgs) As Object' does not have the same
signature as delegate 'Delegate Sub ImageClickEventHandler(sender As Object,
e As System.Web.UI.ImageClickEventArgs)'.
Can anyone help?