Asp.net - C# - Disable button / lock screen after download is complete on the browser
Hi,
I am using xmlwriter to create XML document from excel, I am able to create XML document and able to provide an option to the user to save the file on their computer.
However when download completes the form is still open and all button are accessible. I would ideally like to disable the "Btn_Process " btn when the download starts or ends , I have used the option to disable to the button at all stages on click event of the button and also below in the finally statement , but the btn does not get disabled.
I would like any of the following :
1. Disable button Btn_Process on click of the btn or after the download completes
2. Lock screen when downloading is in progress then unlock
3. Redirect to the same page after download is complete
Thanks for your reply, I was thinking of using client script and you gave me a good option of hiding the button, the hide button is working however out of scope I did try to disable the button but thats not working , as I am using the asp.net , I am using the following to identify the button " FeaturedContent_" is added automatically to the button name by asp.net, so manually added the ID.
<script type="text/javascript"> $(function () { $('#FeaturedContent_Button1').click(function () { $(this).enabled = false; /* tried $(this).disabled = true; both are not working */ }); });
Thanks for your reply, I was thinking of using client script and you gave me a good option of hiding the button, the hide button is working however out of scope I did try to disable the button but thats not working , as I am using the asp.net , I am using the following to identify the button " FeaturedContent_" is added automatically to the button name by asp.net, so manually added the ID.
Open in new window
Any idea why its not working?