SmartPart with AJAX - UpdatePanel Problem

Jun 8, 2010 at 7:41 AM

I'm having trouble with a user control I created implementing an update panel, and deployed using the SmartPart with AJAX webpart. I've placed a listbox within the update panel with AutoPostBack set to true, but it posts back the entire page rather than just the update panel. It's as if the update panel isn't there at all. I've included the code below. I tested this on a generic .NET website and it worked fine.

Can anyone please tell me what I'm doing wrong?

<asp:UpdatePanel ID="updatePnl" runat="server">
<ContentTemplate>

    <asp:ListBox AutoPostBack="true" runat="server" ID="departments" OnSelectedIndexChanged="departments_selectedindexchanged">
        <asp:ListItem Text="Engineering" Value="Engineering"></asp:ListItem>
        <asp:ListItem Text="Human Resources" Value="HR"></asp:ListItem>
        <asp:ListItem Text="Sales" Value="Sales"></asp:ListItem>
        <asp:ListItem Text="Marketing" Value="Marketing"></asp:ListItem>
    </asp:ListBox>
    <div>
        <asp:Label runat="server" ID="results"></asp:Label>
    </div>
</ContentTemplate>
</asp:UpdatePanel>