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 ?
I thought that the Postback would happen after the
onClientClickhas finished.OK, then you could use a
input type="button"and trigger the Postback manually(__doPostBack('Button1,'');).But I’m pretty sure that the postback happens only after the
onClientClickhas finished, because you can prevent a PostBack by returningfalsefrom theonClientClick. You should debug your javascript, because this behaviour is exceptional.