[英]SemanticZoom: is it possible to stop the view transition in code behind?
[英]Is it possible to stop execution of code behind at certain point and ask for confirmation and then proceed?
我通常使用
ScriptManager.RegisterStartupScript(this, this.GetType(), "pop", "<script>alert('Claim Saved Successfully with Claim No: " + ClaimNo + "');var currentPageUrl =document.location.toString().toLowerCase();window.location.assign(currentPageUrl);</script>", false);
在后面的代碼中,向用戶彈出一條消息,表明條目已成功保存。 但是我的問題是,在保存條目的同時我也正在下載文件的情況下,它不會顯示在方案中。
我將條目保存在數據庫中,然后根據保存的數據生成pdf文件並下載。 所有這些都只需單擊一個按鈕。 將條目保存在數據庫中后,我想向用戶顯示彈出消息,然后問他是否要繼續下載文件? 可能嗎? 如果是,怎么辦?
我不確定,但也許像這樣的事情在下載過程中的某些函數中運行您的20行代碼,然后運行類似的東西
ScriptManager.RegisterStartupScript(page,this.GetType(), "temp","javascript:Confirmopen();
",true);
function Confirmopen()
{
if (confirm(" Download file ?"))
{
enter code here
call server side function for download
}
else
{
return false;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.