C# 如何仅更新已更改检查的面板? 已更改受保护的void chkParent_(对象发送方,事件参数e) { this.ChildList.DataSource=this.ChildValues; this.ChildList.DataBind(); }

C# 如何仅更新已更改检查的面板? 已更改受保护的void chkParent_(对象发送方,事件参数e) { this.ChildList.DataSource=this.ChildValues; this.ChildList.DataBind(); },c#,updatepanel,C#,Updatepanel,在检查父项的更改时,子项会得到更新,但整个页面也会加载。有办法避免吗 <asp:UpdatePanel id="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <ContentTemplate> <asp:CheckBox ID="chkParent" runat="server" autopostback="true" OnCheckedChanged="chkPa

在检查父项的更改时,子项会得到更新,但整个页面也会加载。有办法避免吗

<asp:UpdatePanel id="up1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">

<ContentTemplate>

<asp:CheckBox ID="chkParent" runat="server" autopostback="true" OnCheckedChanged="chkParent_OnCheckedChanged" />

<asp:DataList ID="ChildList" runat="server" OnItemDataBound="ChildList_OnItemDataBound">

 </ContentTemplate>
</asp:UpdatePanel>

protected void chkParent_OnCheckedChanged(object sender, EventArgs e)
{
 this.ChildList.DataSource = this.ChildValues;
this.ChildList.DataBind();
}