`SelectedIndexChanged`它没有开火

时间:2016-06-30 14:45:50

标签: c# sharepoint sharepoint-2013

我有一个DropDownList,我有一个<DIV>元素,当我更改下拉列表的值时,我的div不会显示我有以下ascx代码

<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true">
        <asp:ListItem Value="Zgjidh Kompaninë">-- Zgjidh Kompaninë--</asp:ListItem>
        <asp:ListItem Value="Meridian Corporation">Meridian Corporation</asp:ListItem>
        <asp:ListItem Value="Meridian Express">Meridian Express</asp:ListItem>
        <asp:ListItem Value="Buka">Buka</asp:ListItem>

</asp:DropDownList>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>       
    <div id="chart_div"></div>
 </ContentTemplate>  
<Triggers>
    <asp:AsyncPostBackTrigger ControlID="DropDownList2" EventName="SelectedIndexChanged"/>
</Triggers>
</asp:UpdatePanel>

如果我将此<div id="chart_div"></div>放在UpdatePanel之外,那么它可以正常工作,或者如果我只是删除了<Triggers>标记,那么它会同时刷新页面。那么为什么我的Div没有显示我需要请

我正在开发一个sharepoint WebPart!

0 个答案:

没有答案
相关问题