我有一些
代码在
用户选择下拉列表中的项目时触发.现在,我想以编程方式设置selectedindex时触发相同的
代码.
我试过设置
ddlSystemLevelDCP.SelectedIndex=2;
这也是
ddlSystemLevelDCP.SelectedValue="2";
他们都没有解雇这个事件.但是,当用户更改选择时,将触发此事件.
设置所选索引.比如说2然后用null参数
调用该事件.
ddlSystemLevelDCP.SelectedIndex=2;
ddlSystemLevelDCP_SelectedIndexChanged(null,null);
这应该工作.
原文链接:https://www.f2er.com/aspnet/247514.html