content not updated in UpdatePanel (in a Web Part) RRS feed

  • Question

  • I have to update asp controls (label and table) in my Web Part (SharePoint2010) when the user select an element in a DropDownList control. I added a EventHandler to the DropDownList that edit the label and the cells of the the table.

    I am using asp:UpdatePanel with asp:AsyncPostBackTrigger trigger.

    When debugging in VS2010, I can see that the server side method is called, the label and the table cells are updated.

    But the controls aren't updated in the Web Part when AJAX call is returned. And when I monitor the HTTP response in FireBug console, I can see that the server isn't returning the updated controls values.

    Here is the code of ascx :

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <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:AsyncPostBackTrigger ControlID="DropDownList1" EventName="SelectedIndexChanged" />

    And in the server side method listBoxSelectedIndexChanged (partial class ListeUserControl : UserControl), I am doing this :

    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;

    I am not using a gridview because the structure of the table is complex.

    Any idea please ?


    • Moved by Brent Serbus Wednesday, February 1, 2012 1:22 AM maybe this is right place (From:SharePoint - Development and Programming (pre-SharePoint 2010))
    Monday, January 30, 2012 6:02 PM

All replies

  • Hi Zino_o,


    Thank you for your question .I am trying to involve someone familiar with this topic to further look at this issue.



    Entan Ming

    TechNet Community Support

    Wednesday, February 1, 2012 9:12 AM
  • Information in this article might help http://msdn.microsoft.com/en-us/library/bb861877.aspx.

    Saturday, March 17, 2012 12:12 AM
  • No I did tried the solutions offered in this article but nothing is working.

    For testing purpose, I replaced the dropdownlist by a button and the update panel works perfectly with the AsyncPostBackTrigger trigger (click event).

    So the problem is with the dropdownlist and the SelectedIndexChanged event ...

    It is so annoying problem ...


    Monday, March 19, 2012 5:38 PM
  • Can you move the DropDownList inisde the UpdatePanel, see if that helps.
    Tuesday, March 20, 2012 10:59 PM
  • I have already tried to move the DropDownList inside the UpdatePanel in vain, it isn't working.


    Wednesday, March 21, 2012 9:21 AM
  • If you are still having issues with this and you cannot find an answer from the forum directly, please visit the link below to see the various paid support options available that may better meet your needs.
    Monday, March 26, 2012 11:38 PM