Compiler Error Message: CS0123:

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default Compiler Error Message: CS0123:

    Hi Everyone...Can somebody help me figure out how to fix this error?
    I'm out of ideas! Thanks!

    CS0123: Method 'IC.Reports.Comp.webic_first.EmpLink_ItemCommand(o bject,
    System.Web.UI.WebControls.CommandEventArgs)' does not match delegate
    'void System.EventHandler(object, System.EventArgs)'

    In my ASCX page, I have:


    <asp:TemplateColumn HeaderText="theID">
    <ItemTemplate>
    <asp:linkbutton id="EmpLink" OnClick="EmpLink_ItemCommand"
    CommandArgument='<%# DataBinder.Eval(Container.DataItem, "the_nbr")
    %>' runat="server" Text='<%# DataBinder.Eval(Container.DataItem,
    "the_nbr") %>' CommandName="select" />
    </ItemTemplate>
    </asp:TemplateColumn>


    And the backend I have:


    protected void EmpLink_ItemCommand(object sender,
    System.Web.UI.WebControls.CommandEventArgs e)
    {
    string cmd = e.CommandName;
    if (cmd == "select")
    {
    int m_empnbr= 0;
    m_empnbr = Convert.ToInt32(e.CommandArgument);
    GetInfo(m_empnbr);
    }
    }
    mary Guest

  2. Similar Questions and Discussions

    1. Compiler Error Message: BC30451: Name 'tk' is notdeclared.
      Hi Guys, I have a MAJOR problem, I am using Dreamweaver MX and I am passing the below parameters to a stored procedure which is meant to return me...
    2. Compiler Error Message: BC30451: Name 'dsProduct' is not declared.
      Hi dsProduct must be a property, and you defined it as function. bye "mareal" <m@m.com> wrote in message...
    3. Compiler Error Message: BC30201: Expression expected.
      Error on Line 36 Line 34: <TABLE id="Table3" cellSpacing="2" cellPadding="2" width="100%" border="0"> Line 35: <TR> Line 36: <TD...
    4. Compiler Error Message: CS1595 (is Q318274 the whole story?)
      We have a Web Service written in VB.NET (1.0 SP2) on W2K IIS5... One of our customers is reporting symptoms that sound exactly like those...
    5. Compiler Error Message: The compiler failed with error code 128.
      Hi. I am having trouble running my aspx code. I created two simple webforms, which i try to run from two different directories one is giving me...
  3. #2

    Default Re: Compiler Error Message: CS0123:

    it looks like you hand generated the itemcommand event. you need
    system.eventargs instead of your commandeventargs parameter in your
    itemcommand handler.
    "mary" <marjan.s.monabbat@wellsfargo.com> wrote in message
    news:19980dd5.0308131524.1142cf31@posting.google.c om...
    > Hi Everyone...Can somebody help me figure out how to fix this error?
    > I'm out of ideas! Thanks!
    >
    > CS0123: Method 'IC.Reports.Comp.webic_first.EmpLink_ItemCommand(o bject,
    > System.Web.UI.WebControls.CommandEventArgs)' does not match delegate
    > 'void System.EventHandler(object, System.EventArgs)'
    >
    > In my ASCX page, I have:
    >
    >
    > <asp:TemplateColumn HeaderText="theID">
    > <ItemTemplate>
    > <asp:linkbutton id="EmpLink" OnClick="EmpLink_ItemCommand"
    > CommandArgument='<%# DataBinder.Eval(Container.DataItem, "the_nbr")
    > %>' runat="server" Text='<%# DataBinder.Eval(Container.DataItem,
    > "the_nbr") %>' CommandName="select" />
    > </ItemTemplate>
    > </asp:TemplateColumn>
    >
    >
    > And the backend I have:
    >
    >
    > protected void EmpLink_ItemCommand(object sender,
    > System.Web.UI.WebControls.CommandEventArgs e)
    > {
    > string cmd = e.CommandName;
    > if (cmd == "select")
    > {
    > int m_empnbr= 0;
    > m_empnbr = Convert.ToInt32(e.CommandArgument);
    > GetInfo(m_empnbr);
    > }
    > }

    Alvin Bruney Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139