Solved

server.transfer url problem?

Posted on 2002-05-18
2
206 Views
Last Modified: 2008-03-04
when doing a server.transfer using ASP.NET, the URL does not change to the new location... it stays set to the original location the user pointed to.

for example, user goes to http://www.somedomain.com/default.aspx, server.transfer redirects to http://www.somedomain.com/intro.htm. yet the URL in the browser address bar stays set to http://www.somedomain.com/default.aspx.

why is this? and is it a problem?

and does the browser contain the real transfered-to URL, but happens to show the wrong one?

thanks!
0
Comment
Question by:loyaliser
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
naveenkohli earned 75 total points
ID: 7018465
When you do Server.Transfer, the execution of thread shifts to new page. The execution of previous thread is not terminated. All the headers, response from redirecting page is carried on to new page. Where as when you do Response.Redirect, the execution of thread is terminated. You can do a very simple experiement. Call Response.Redirect but put the call within try/catch block and you will see that ThreadAbort exception is thrown. This is due to termination of current execution thread.

There is no problem with what you are observing.

Naveen
0
 
LVL 1

Author Comment

by:loyaliser
ID: 7018559
ok... that makes sense.

thanks!
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question