what is the purpose of command name and command argument for a control example button? when should we go for this?
When you have multiple
Buttoncontrols on a Web page, use the
CommandNameproperty to specify or determine the command name associated with each
Buttoncontrol. You can set the
CommandNameproperty with any string that identifies the command to perform. You can then programmatically determine the command name of the
Buttoncontrol and perform the appropriate actions.
An optional parameter passed to the Command event along with the associated CommandName.
...which you retrieve from the event object (for instance,
So for instance, you might have four buttons with the
CommandName "DoSomething" but four different
CommandArguments telling your "DoSomething" code what to do, or what to do it to. You might also have other buttons with
CommandName = "DoSomethingElse" that, well, do something else. :-)