DropDownList的选定索引更改事件会在每次回发时触发

时间:2015-08-20 06:01:03

标签: c# asp.net ajax

我有三个DropDownList带有ajax CascadingDropDown列表。

<asp:DropDownList ID="ddl_Award" runat="server" ></asp:DropDownList>
<asp:CascadingDropDown ID="cas_Award" runat="server" TargetControlID="ddl_Award"
    Category="Award" PromptText="-- Select --" LoadingText="Loading Award..."
    ServicePath="~/WebServices/WebServiceSearch.asmx"  ServiceMethod="GetAward" ContextKey="">
</asp:CascadingDropDown>

<asp:DropDownList ID="ddl_AwardPosition" runat="server" ></asp:DropDownList>
<asp:CascadingDropDown ID="cas_AwardPosition" runat="server" TargetControlID="ddl_AwardPosition"
   Category="AwardPosition" PromptText="-- Select --" LoadingText="Loading Award Position..." 
   ServicePath="~/WebServices/WebServiceSearch.asmx" ServiceMethod="GetAwardPosition" ParentControlID="ddl_Award">
</asp:CascadingDropDown>

<asp:DropDownList ID="ddl_AwardClassification" runat="server"   OnSelectedIndexChanged="ddl_AwardClassification_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
<asp:CascadingDropDown ID="cas_AwardClassification" runat="server" TargetControlID="ddl_AwardClassification" 
   Category="AwardClassification" PromptText="-- Select --" LoadingText="Loading Award Classification..." 
   ServicePath="~/WebServices/WebServiceSearch.asmx" ServiceMethod="GetAwardClassification" ParentControlID="ddl_AwardPosition">
</asp:CascadingDropDown>

SelectedIndexChanged每次回发都会发生第三次DropDownList事件。

如何阻止此SelectedIndexChanged事件?

0 个答案:

没有答案