Compiler Error Message: CS0123:

M

mary

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(object,
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);
}
}
 
A

Alvin Bruney

it looks like you hand generated the itemcommand event. you need
system.eventargs instead of your commandeventargs parameter in your
itemcommand handler.
 

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
474,135
Messages
2,570,786
Members
47,342
Latest member
KelseyK737

Latest Threads

Top