How to block ui while file download in asp.net C# without using cookie?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to block ui while file download in asp.net C# without using cookie?



I have httponlycookie is true in web.config..so Server side cookie is not accessible in javascript to unblock ui.. is there any option to block ui without using cookie value



Block and unblock UI Code:


function blockUIForDownload()
$.blockUI();
var start = new Date().getMinutes();
var token = new Date().getTime(); //use the current timestamp as the token value
$("#<%= download_token_value_id.ClientID %>").val(token);
$.blockUI();
fileDownloadCheckTimer = window.setInterval(function ()
var cookieValue = $.cookie('fileDownloadToken');
if (cookieValue == token)
window.clearInterval(fileDownloadCheckTimer);
$.removeCookie('fileDownloadToken'); //clears this cookie value
$.unblockUI();
var end = new Date().getMinutes();
var time = end - start;
//alert('Execution time: ' + time +' minutes');

, 1000);





where do you set the cookie value?
– Alex
Aug 10 at 7:48





How do you initiate the download of your file? You could let jQuery handle the download using their ajax functions, block the UI on initiating the download and unblocking after you received the proper event from the ajax response using promises.
– Agash Thamo.
Aug 10 at 7:49









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered