what is the purpose of command name and command argument for a control example button? when should we go for this?
The Command event makes it easy to write a single method that handles the clicks of multiple buttons.
protected void Button_Command(object sender, CommandEventArgs e)
{
switch (e.CommandName)
{
case "Back":
FeedbackLabel.Text = "Back";
break;
case "Up":
FeedbackLabel.Text = "Up";
break;
case "Forward":
FeedbackLabel.Text = "Forward";
break;
}
}