what is the purpose of command name and command argument for a control example button?

后端 未结 7 1461
孤街浪徒
孤街浪徒 2021-02-07 09:57

what is the purpose of command name and command argument for a control example button? when should we go for this?

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-07 10:35

    Have a look at command name and command argument MSDN description.

    When you have multiple Button controls on a Web page, use the CommandName property to specify or determine the command name associated with each Button control. You can set the CommandName property with any string that identifies the command to perform. You can then programmatically determine the command name of the Button control and perform the appropriate actions.

    The CommandArgument property complements the CommandName property by allowing you to provide additional information about the command to perform. For example, if you set the CommandName property to Sort and the CommandArgument property to Ascending, you specify a command to sort in ascending order.

提交回复
热议问题