Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel button on page taking a long time to load 2

Status
Not open for further replies.

StuckInTheMiddle

Programmer
Mar 3, 2002
269
US
I have a page in my ASP.NET(VB) that retrieves summary info for users when they first log in to my application.

For some users with lots of info this page can take 2-3 minutes to load, what I have tried to do is create a cancel link/button on my main page (that redirects be default to my long loading .aspx page) to allow them to stop this page from loading if they don't want to wait and skip to another page, my main menu for instance.

I tried doing this however it seems ASP.NET (or IIS perhaps) tries to finish the first page loading before redirecting to the link on my cancel button which defeats it's purpose.

I'm not the greatest .NET programmer but thought something like this should be fairly simple, I guess I'm missing something

A,


"If you can stay calm, while all around you is chaos...then you probably haven't completely understood the seriousness of the situation.
 
If you want to redirect the user from the client side, you'll have to use a client side language to do the redirect (e.g. javascript). I'd look into why your information is taking 2-3 minutes to retrieve though and see if that can be improved.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Hi ca8msm, Thanks for the reply.

I have tried various client side things believe me. A simple A HREF link to allow them to click to another page, as well as a HMTL Button with a javascript event to do the same.

Server side attempts have included ASP.NET button that uses server.Transfer and another attempt with Response.Redirect all my attempts still 'wait' for the long page to load before being redirected.

I'd love to be able to improve the long wait time, unfortunately control of that piece is not in my hands.

A,


"If you can stay calm, while all around you is chaos...then you probably haven't completely understood the seriousness of the situation.
 
Also, with regards to control of the wait time not being in your hands, I think you should still try to take responsibility for it. Even though you may not be the one who does the work to improve it, it is still your site that will be displaying the data so it's your responsibility to make sure that the users can see the required data.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Here's what I used in my js example as well:
code]
<input type="button" onclick="javascript:window.location=' value="cancel" />
[/code]


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 
Look into caching as well. If some of the data is "static", put it in cache. If it is different for each user, then as Mark says, look into what is loading and if it needs to load each time.
 
Hi All,

Thanks for the input.

My problem was I'm trying to link them to another .aspx page, and the server was waiting to finish serving up the code to the first .aspx page before doing so.

If I have my clientside cancel button link them to simple .html page then it stops trying to load the data from the first .aspx page. ca8msm this is why your code was working for you but not me.

Thanks all

A,

"If you can stay calm, while all around you is chaos...then you probably haven't completely understood the seriousness of the situation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top