DataList item command
-
I want to know which button is clicked on datalist item command i am having three buttons in itemcommand . how can i get the click event of particular button?
-
I want to know which button is clicked on datalist item command i am having three buttons in itemcommand . how can i get the click event of particular button?
DataListCommandEventArgs e using e.commandName we can check for button command event.
-
I want to know which button is clicked on datalist item command i am having three buttons in itemcommand . how can i get the click event of particular button?
Hi there, There are probably a few ways for doing that. I use a switch: protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e) { switch (e.CommandName) { case "Edit": //do somthing break; case "Delete": //do somthing break; } } Hope it helps. Danny
-
Hi there, There are probably a few ways for doing that. I use a switch: protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e) { switch (e.CommandName) { case "Edit": //do somthing break; case "Delete": //do somthing break; } } Hope it helps. Danny
it worked . Thanks Danny , keep the good words going on.
-
I want to know which button is clicked on datalist item command i am having three buttons in itemcommand . how can i get the click event of particular button?
Hi danny Give the Command name to the buttons and check the Command name in ItemCommand Event like this if(e.Commandname=="Add") { //Do Something here. }