[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Keep current page displayed untill new page is loaded

I just want to keep current page displayed untill new page is loaded in asp.net 2.0.
I don't want to see a blank page.

Ajax is not the solution for my problem.

Thanks a lot !
0
ICOTech
Asked:
ICOTech
  • 5
  • 4
  • 3
1 Solution
 
prairiedogCommented:
Is it because the second page takes a long time to load?
0
 
ChetOS82Commented:
We are not sure what your issue is... Are you clicking a link to another page, and you don't want the current one to go away first?
0
 
ICOTechAuthor Commented:
Yes ChetOs82 is rigth I don't want to go away first and the second page is a page of my web application.

Do you have a solution ?

Sorry for my english I speak habitualy french.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ChetOS82Commented:
What you want is not possible.  When you click a link, the page is unloaded from memory.  The new page is then requested, processed, downloaded, and rendered.  Since they are two distinct events, you cannot keep on page up while the next one works.

There are ways of tackling this problem, but they depend on why the second page takes so long to load.

If it is doing some sort of processing, you could put up an intermediate page (which says something like "Searching..." or "Processing...").  If the page is just huge (several megs), then there isn't much you can do (other than make it smaller).  If it is loading a bunch of graphics, you could pre-cache the graphics in the first page.
0
 
ICOTechAuthor Commented:
Ok and how I can pre-cache the graphic ?
0
 
ChetOS82Commented:
Most people use Javascript:

<script type="text/script">
function preCache() {
image1 = new Image();
image1.src = "image1.gif";

image2 = new Image();
image2.src = "image2.gif";
}
</script>
<body onload="preCache();">
0
 
ICOTechAuthor Commented:
Somebody have another solution ? The last one not give a great result.
0
 
prairiedogCommented:
>>>Somebody have another solution ? The last one not give a great result.
I might have one if you answer my question.
0
 
ICOTechAuthor Commented:
Yes prairiedog, the second page takes 4 to 6 seconds to load.
0
 
prairiedogCommented:
OK.
As ChetOS82 mentioned before, it is not possible to keep the first page displayed while the request has been redirected to the second page. I believe what you need is to give user some feedback before the second page is fully loaded, instead of just a black page. If we can put something like a popup saying "The page is loading, please wait...", and the popup will disappear once the second is loaded. Is this option acceptable?
0
 
ICOTechAuthor Commented:
Is not acceptable for my client.
I just want to keep current page displayed untill new page is loaded or else load template master of the second page immediatly and the content after but I don't want to use ajax. I need postback to conserv my hystoric.

P.S : Sorry for my english I speak habitualy french
0
 
prairiedogCommented:
I didn't say AJAX in my previous post, did I? With pure JavaScript, we still can do what I mentioned in my previous post, but if it is not acceptable, then I am sorry you are pretty much in the dead end.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now