Update panel and usercontrols
Posted
by Charlie Brown
on Stack Overflow
See other posts from Stack Overflow
or by Charlie Brown
Published on 2009-07-21T16:45:23Z
Indexed on
2010/05/12
22:04 UTC
Read the original article
Hit count: 417
I have two web user controls nested inside of an update panel. The events inside the user controls do not appear to trigger the panel. For testing, I have set the method the fires to sleep for 3 seconds, and added an update progress panel to the page. The update progress panel never comes up and the page reflashes as usual.
The user controls work correctly and do what they need to do, but I would like to make them ajaxy and pretty.
Is there a special method for adding usercontrols to an update so the postback works correctly?
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="100">
<ProgressTemplate>
UPDATING...</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="order">
<keg:BeerList runat="server" ID="uxBeerList" />
<kegcart:ShoppingCart runat="server" ID="uxCustomerCart" />
<br class="clearfloat" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
Protected Sub uxBeerList_AddItem(ByVal item As KegData.IOrderableItem) Handles uxBeerList.AddItem
uxCustomerCart.AddItemToOrder(item)
System.Threading.Thread.Sleep(5000)
End Sub
© Stack Overflow or respective owner