I have an asp button that is used to upload images (using uploadify) and it has also code behind . The problem is I want to run the client side script before postback. but the postback occurs while uploading images .
<ASP:BUTTON ID="Button1" runat="server" onclick="Button1_Click" onclientclick="Save();"/> How can I force it to finish the client script first ?
onCLientClickhas finished. Ok, then you could use ainput type="button"and trigger the Postback manually(__doPostBack('Button1,'');). But i'm really sure that the postback happens after the onclientclick has finished, because you can prevent a PostBack while you are returning false from theonClientClick.OnClientClickhandler returns (or returns true) and ifOnClientClickreturns false then the postback will be cancelled.