What is the difference between click and command events?
When a user clicks a button, it first processes the click and then the command. In fact, the commandname and commandargument attributes are defined only to pass (bubble) related events to the parent control. If the parent control does not trigger the command event, it makes the user more clear. The click and command events of the button are redundant, so you can leave it blank. For obtaining the commandname or commandargument attribute in the click event, write:
(Button) sender). commandname (button) sender). commandargument
You can do this without obtaining the button attributes only in the command event, but not in the click event. In fact, any attribute in the click event can be obtained.
Click is a direct click button, while command generally has a template column. If you use a button in a gridview for update, insert, delete, and so on. You cannot obtain the data of the selected items in the table by clicking the button. Commandname can be used to start the event in the upper-level space of the button. That is, use the update, insert, delete... event of the gridview.