Re-Enable button after submit

2019-09-01 23:15发布

问题:

I'm employing a solution similar to the answer of OnclientClick and OnClick is not working at the same time ?

How this currently works is that a file is generated and returned to the client, however after the file is returned the button should become active again. so the response contains the file. But the button does not reactivate.

I'm not certain if this can be done. Any thoughts? Thanks

回答1:

You could set the Id mode of the button to static. Then choose a unique Id for the button. Whenever you have verified that the file is successfully transmitted you can call (jquery):

$("#idOfSubmitButton").attr("disabled", false);