Hi Everyone !!!!
I have one submit button on ModalPopup, clicking it downloads the pdf file
So what I have to do is to display the Loader on the page when the button is clicked once the pdf is download remove the loader trying to achieve this in Javascritp.
found one thread its not working for me.
https://forums.asp.net/t/1127967.aspx?ModalPopup+with+Ajax+Request
I found this solution
<script>
var isAysyncCallback = false;
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequest);
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(methodRun);
function beginRequest(sender, args)
{
isAysyncCallback = true;
}
function methodRun(sender, args)
{
if (isAysyncCallback)
{
//code in here only runs on the completion of a updatepanel update (and maybe an ajax call via the script manager too - not sure about that one)
}
//code in here will run BOTH on page load AND on the completion of a updatepanel update (and maybe an ajax call via the script manager too - not sure about that one)
}
</script>
where do I need to Add this code
its giving error
Uncaught TypeError: Cannot read property 'getInstance' of undefined
in browser Console