hoa*_*key 0 c# asp.net events
除了从下拉列表中触发此事件之外,我还希望能够从我的代码中触发它.这有可能吗?如果可以的话怎么样?
谢谢
斯图
Iai*_*ard 5
执行此操作的最佳方法是将事件中的代码包装到方法中,并从两个位置调用它.
但如果您确实想直接调用该事件(我不推荐),您可以这样做:
MyComboBox_SelectedIndexChanged(null, null);
(除非你使用方法sender或EventArgs方法,否则你也需要提供这些)
sender
EventArgs
归档时间:
15 年,3 月 前
查看次数:
63 次
最近记录: