Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ajax UpdatePanel(Web部件)中未更新的内容_Ajax_Sharepoint_Updatepanel_Web Parts - Fatal编程技术网

Ajax UpdatePanel(Web部件)中未更新的内容

Ajax UpdatePanel(Web部件)中未更新的内容,ajax,sharepoint,updatepanel,web-parts,Ajax,Sharepoint,Updatepanel,Web Parts,当用户在DropDownList控件中选择元素时,我必须更新Web部件(SharePoint2010)中的asp控件(标签和表格)。我在DropDownList中添加了一个EventHandler,用于编辑标签和表中的单元格 我正在使用asp:UpdatePanel和asp:AsyncPostBackTrigger触发器 在VS2010中调试时,我可以看到服务器端方法被调用,标签和表格单元格被更新 但是当返回AJAX调用时,Web部件中的控件不会更新。当我在FireBug控制台中监视HTTP响应

当用户在DropDownList控件中选择元素时,我必须更新Web部件(SharePoint2010)中的asp控件(标签和表格)。我在DropDownList中添加了一个EventHandler,用于编辑标签和表中的单元格

我正在使用asp:UpdatePanel和asp:AsyncPostBackTrigger触发器

在VS2010中调试时,我可以看到服务器端方法被调用,标签和表格单元格被更新

但是当返回AJAX调用时,Web部件中的控件不会更新。当我在FireBug控制台中监视HTTP响应时,我可以看到服务器没有返回更新的控件值

以下是ascx的代码:

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 
    OnSelectedIndexChanged="listBoxSelectedIndexChanged">
</asp:DropDownList>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Label ID="testlabel" runat="server">test</asp:Label>
        <asp:Table ID="Table1" runat="server" Height="100px" Width="253px" 
            CellPadding="1" CellSpacing="1" CssClass="marcheFonds">
        </asp:Table>

    </ContentTemplate>

    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />
    </Triggers>
</asp:UpdatePanel>
我没有使用gridview,因为表的结构很复杂

有什么想法吗

请查看用户评论。回发行为问题在SharePoint 2010中是相同的。尝试实现EnsurePanelFix()方法

Table1.Rows[i].Cells[j].Text = rate.month1;
Table1.Rows[i].Cells[j].Text = rate.month2;
Table1.Rows[i].Cells[j].Text = rate.month3;
Table1.Rows[i].Cells[j].Text = rate.month6;
Table1.Rows[i].Cells[j].Text = rate.month12;

testlabel.Text = rate.code;