问题描述
控件示例按钮的命令名称和命令参数的用途是什么?我们什么时候应该去呢?
what is the purpose of command name and command argument for a control example button? when should we go for this?
推荐答案
(我的重点)
...从事件对象(例如, e
)中检索为 e.CommandArgument
的
...which you retrieve from the event object (for instance, e
) as e.CommandArgument
.
例如,您可能有四个带有 CommandName
"DoSomething"的按钮,但是四个不同的 CommandArguments
告诉您的"DoSomething"代码该做什么或该做什么它来.您可能还具有 CommandName
="DoSomethingElse"的其他按钮,可以执行其他操作.:-)
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. :-)
这篇关于控件示例按钮的命令名称和命令参数的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!