[英]Change processing page while loading data is asp.net
如何在asp.net中加载某个数据显示页面时显示处理页面?
I still like the classic 2 page solution. 我仍然喜欢经典的2页解决方案。 The first page has an BODY ONLOAD call that does "window.location = 'Page2.asp';".
第一页有一个BODY ONLOAD调用,执行“ window.location ='Page2.asp';”。 This results in the first page being displayed and the 2 page being invoked.
这导致显示第一页,并调用第二页。 While the second page is doing it's work the first page remains displayed.
当第二页正在工作时,第一页仍会显示。
There are a couple of "problems" with this solution: 此解决方案有两个“问题”:
You could also do this with AJAX (all on one page): 您也可以使用AJAX来做到这一点(全部在一页上):
AJAX is nice, except that it may hide any server side errors that occur (ie if the page crashes horribly). AJAX很好,除了它可以隐藏发生的任何服务器端错误(即,如果页面崩溃严重)。 Also it depends on how you prefer to do ajax (jQuery vs ASP.NET Ajax vs XYZ).
此外,这取决于您更喜欢做ajax(jQuery vs ASP.NET Ajax vs XYZ)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.