Checkboxlist selectedindexchanged事件未在VS2010中触发 [英] Checkboxlist selectedindexchanged event is not firing in VS2010
本文介绍了Checkboxlist selectedindexchanged事件未在VS2010中触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的网页上有复选框列表。我还将autopostback属性设置为true。
当我选中复选框中的任何项目时。 selectedindexchanged事件没有被解雇。
我哪里错了。
I have checkboxlist in my webpage . I also set autopostback property to true.
When I select any item in the checkbox. The selectedindexchanged event is not getting fired.
Where I am going wrong.
<asp:CheckBoxList
ID="chkdecisionlist" runat="server"
RepeatLayout="OrderedList" AutoPostBack="True"
OnSelectedIndexChanged="chkdecisionlist_SelectedIndexChanged">
<asp:ListItem>Preview Weekend or Preview Day </asp:ListItem>
<asp:ListItem>Newspaper/Magazine Ad </asp:ListItem>
<asp:ListItem>Social Networking </asp:ListItem>
<asp:ListItem>MBA/Higher Education Fair </asp:ListItem>
<asp:ListItem>Rankings</asp:ListItem>
<asp:ListItem>Other Media </asp:ListItem>
</asp:CheckBoxList>
谢谢,
Rajesh
Thanks,
Rajesh
推荐答案
使用如下更新面板:
Use update panel like below :
<asp:UpdatePanel ID="Up" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:CheckBoxList
ID="chkdecisionlist" runat="server"
RepeatLayout="OrderedList" AutoPostBack="True"
OnSelectedIndexChanged="chkdecisionlist_SelectedIndexChanged">
<asp:ListItem>Preview Weekend or Preview Day </asp:ListItem>
<asp:ListItem>Newspaper/Magazine Ad </asp:ListItem>
<asp:ListItem>Social Networking </asp:ListItem>
<asp:ListItem>MBA/Higher Education Fair </asp:ListItem>
<asp:ListItem>Rankings</asp:ListItem>
<asp:ListItem>Other Media </asp:ListItem>
</asp:CheckBoxList>
</ContentTemplate>
</asp:UpdatePanel>
如果仍未解决,请在更新面板中使用触发器。
接受如果有帮助,请投票。
If still its not solve then use trigger in update panel.
Accept and vote if help to you.
这篇关于Checkboxlist selectedindexchanged事件未在VS2010中触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文