Need to set the commandName of the web control, then judge ItemCommand
Private void mainDataGrid_itemcommand (Object Source, System.Web.ui.WebControls.DataGridCommandeventArgs E) {if (e.commandname == "xxxx") {
...} else if (e.commandname == "xxxx") {...
} Binddata ();