ItemCommand Event fires twice

  • Thread starter Thread starter Jonas Nilsson
  • Start date Start date
J

Jonas Nilsson

Hi!

I have a DataList with some linkbuttons, and when i click them the
eventhandler fires twice.

Is there a way around this?, it's the same problem with the repeater and
datagrid control also.
public void dblFolders_CommandHandler(object sender,
System.Web.UI.WebControls.DataListCommandEventArgs e)
{
if (e.CommandName=="MoveToFolder")
{
FillControls(e.CommandArgument.ToString()); // THIS WILL BE RUN TWICE
}
}

private void InitializeComponent()
{
this.dblFolders.ItemCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.dblFolders_Comman
dHandler);
this.Load += new System.EventHandler(this.Page_Load);
}

/Jonas
 
Yes.

PJ said:
Have you wired up the event manually as well as defined it in your aspx
element text?


System.Web.UI.WebControls.DataListCommandEventHandler(this.dblFolders_Comman
 
Back
Top