I have an UpdatePanel in a Repeater.
There are a few CheckBoxes in the UpdatePanel with AutoPostBack="true"
There is a Label in the UpdatePanel. I set the Text value of the label in RepeaterName_ItemDataBound as it runs on every item generated.
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="XmlDataSource" OnItemDataBound="R1_ItemDataBound">
<ItemTemplate>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<asp:Label ID="DateTimeLabel2" runat="server" Text="Label"></asp:Label>
<asp:Panel ID="panID" CssClass="actionicon_normal actionicon_compare" runat="server">
<%#XPath("ID")%>
<asp:CheckBox ID开发者_如何学编程="chkID" runat="server" AutoPostBack="true" />
</asp:Panel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ItemTemplate>
</asp:Repeater>
I want the CheckBoxes to automatically update the UpdatePanel as there were no repeater around, but possibly because the OnItemDataBound does not fire on every AsyncPostBack, nothing gets updated. What is the proper way to do this?
In the onclick (JavaScript) call this function __doPostBack('idOfUpdatePanel', ''); Javascript and UpdatePanel
精彩评论