how to resolve delegate error message

Discussion in 'ASP .Net Building Controls' started by TJS, Mar 31, 2005.

  1. TJS

    TJS Guest

    how do I resolve delegate error message ??


    ====== erorr message ======

    Compiler Error Message: BC30408: Method 'Public Sub dothis_click(sender As
    Object, E As System.EventArgs)' does not have the same signature as delegate
    'Delegate Sub ImageClickEventHandler(sender As Object, e As
    System.Web.UI.ImageClickEventArgs)'.

    Source Error:

    Line 15: <body>
    Line 16: <form runat="server">
    Line 17: <art:Button id="Button1" onclick="dothis_click"
    Line 18: runat="server"
    Line 19: BackColor="white"


    Source File: ...\artFormButton.aspx Line: 17


    ====== code ======


    <%@ Page Language="VB" %>
    <%@ Register TagPrefix="art" Namespace="System.Art.Controls"
    Assembly="ArtControls" %>
    <%@ import Namespace="System.Web.UI.WebControls" %>
    <script runat="server">

    sub dothis_click(ByVal sender As Object, ByVal E As EventArgs)
    message.text = "hello from button"
    end sub

    </script>
    <html>
    <head>
    </head>
    <body>
    <form runat="server">
    <art:Button id="Button1" onclick="dothis_click"
    runat="server"
    BackColor="white"
    AlternateText="hello"
    Text="hello"
    Theme="Blue.theme"
    Format="PNG"
    BorderColor="white"
    Height="25px"
    Width="135px"
    ImageAlign="Baseline">
    </art:Button>
    </form>
    <asp:label id="message" runat="server" />
    </body>
    </html>
    TJS, Mar 31, 2005
    #1
    1. Advertising

  2. TJS

    Brock Allen Guest

    The answer is right there in the error:

    > Compiler Error Message: BC30408: Method 'Public Sub
    > dothis_click(sender As Object, E As System.EventArgs)' does not have
    > the same signature as delegate 'Delegate Sub
    > ImageClickEventHandler(sender As Object, e As
    > System.Web.UI.ImageClickEventArgs)'.


    Change dothis_click to accept ImageClickEventArgs instead of EventArgs.

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
    Brock Allen, Mar 31, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kamal
    Replies:
    1
    Views:
    515
  2. TJS
    Replies:
    2
    Views:
    454
    Steve C. Orr [MVP, MCSD]
    Jan 16, 2004
  3. Dean R. Henderson

    How can I resolve error: Could not load type...

    Dean R. Henderson, Nov 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    455
    Brock Allen
    Nov 28, 2005
  4. Replies:
    1
    Views:
    10,108
  5. Adebiyi Marion
    Replies:
    1
    Views:
    202
    Rainer Weikusat
    Mar 31, 2013
Loading...

Share This Page