We have a web page with an UpdatePanel (see sample below). Inside the panel is a Button control that we want to have a JavaScript function run before the page is submitted but that does not work. I think it is due to the button being inside the panel but not sure how to make it work.
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"><ContentTemplate><table style="width: 90%; background-color: #CCCCCC"><tr><td class="center"><asp:Button ID="BtnCloseJob" runat="server" Text="Close This Job"
Font-Bold="True" Font-Size="Medium" OnClientClick="btnDisable(this);" /></td><td class="center"><asp:Button ID="BtnCancel" runat="server" Text="Cancel Closing" ForeColor="Red"
PostBackUrl="~/orders/OpenOrders.aspx" Font-Size="Medium" /></td><td class="center"><asp:Button ID="BtnScan" runat="server" Text="Scan Final Bill"
Font-Size="Medium" PostBackUrl="~/Scan.aspx" /> </td></tr></table></ContentTemplate></asp:UpdatePanel>