set the update mode to conditional.
<asp:updatepanel id=""UpdatePanel1"<br" mode="hold" xmlns:asp="#unknown" /> UpdateMode="Conditional"
runat="server">
and on the button click write the code when ever you want to update the UpdatePanel
UpdatePanel1.Update();