如下设置控件属性:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true"> <ContentTemplate> <div> <asp:FileUpload ID="dcFile" runat="server" /> <asp:Button ID="btnImport" runat="server" Text="导入" OnClick="btnOperate_Click"> </asp:Button> <asp:Button ID="btnRemove" runat="server" Text="删除" OnClick="btnOperate_Click" OnClientClick="return confirm('确定要删除吗?')" > </asp:Button> </div> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="btnImport" /> <asp:PostBackTrigger ControlID="btnRemove" /> </Triggers> </asp:UpdatePanel>