我有一個用C#/ ASP.NET編寫的網站。我試圖在加載頁面時添加加載/等待窗口。我如何在Asp.net中做到這一點?謝謝..在Silverlight中添加加載窗口到ASP.NET網站的子窗口
1
A
回答
1
我和Dojo解決它。我用dijit.dialog。這裏是我的代碼的一部分:
<head>
<!-- api's (you can use also google apis: https://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js) -->
<link href="<%=Url.Content("~/Scripts/dojo/dijit/themes/tundra/tundra.css")%>" rel="stylesheet"
type="text/css" media="screen" />
<link href="<%=Url.Content("~/Scripts/dojo/dojo/resources/dojo.css")%>" rel="stylesheet"
type="text/css" media="screen" />
<script djconfig="parseOnLoad: true" type="text/javascript" src="<%=Url.Content("~/Scripts/dojo/dojo/dojo.js")%>"> </script>
</head>
<script type="text/javascript">
dojo.require("dijit.Dialog");
dojo.require("dijit.layout.ContentPane");
// This is the function to show the spinning whell (or something else to demonstrate the loading progress)
function wheelShow() {
var dialog = new dijit.Dialog({ title: "Loading...", id: "wheel" });
dialog.setContent("<img style='height: 55px; width: 55px; text-align:center' src='../../Content/images/loader.gif' />");
dialog.show();
// hiding of close button in dialog
dojo.query("#wheel .dijitDialogCloseIcon").forEach(function(node, index, arr) {
node.style.visibility = "hidden";
});
}
</script>
<body class="tundra">
<!-- after the page will be completly loaded - hide the wheel -->
<div id="delayedContent" onload="dijit.byId('wheel').hide()">
<!-- your page content here... -->
</div>
</body>
0
我發現了類似的東西。它似乎很容易和實際使用方法:
http://www.codeproject.com/Articles/42344/AJAX-Enabled-MessageBox
謝謝您的回答的方式。
相關問題
- 1. 關閉子窗口加載父窗口
- 2. Silverlight子窗口父窗口
- 3. 添加到窗口
- 4. 在子窗口中使用在父窗口加載的Jquery
- 5. 在主窗口之前加載窗口
- 6. 使用javascript將父窗口的CSS添加到子窗口
- 7. Silverlight的子窗口
- 8. 在完全加載崩潰之前關閉子Silverlight窗口父窗口
- 9. 如何將網站加載到主活動窗口而不是新窗口?
- 10. 從父窗口加載內容到子窗口
- 11. 將子窗口添加到分層窗口
- 12. 在子窗口中加載UserControl
- 13. 在窗口中添加CustomComponent?
- 14. 在子窗口中爲textarea添加值
- 15. c窗口窗體加載#
- 16. 添加UIToolbar到窗口
- 17. 添加npm包到窗口
- 18. 添加視圖到窗口?
- 19. 添加Javascript到ModalDialog窗口
- 20. iframe中的加載窗口
- 21. Jquery窗口加載
- 22. 「添加到主屏幕」彈出窗口沒有出現在我的ASP.Net網站
- 23. JavaScript的 - 重新加載父窗口,如果子窗口關閉
- 24. 在模態窗口內加載網格
- 25. WPF VS2013 - 添加新窗口作爲主窗口的子項目
- 26. 處理當前窗口並在主窗口中加載新的fxml窗口
- 27. 在窗口加載後(
- 28. 在對話窗口中加載網站內容
- 29. 添加DockWidget在主窗口
- 30. 在內部添加窗口到另一個窗口