Server.Transfer does not show correct page in address bar

B

Ben Fidge

When using Server.Transfer, the calling page name is still displayed in the
browser address bar, as opposed to the called page. This is really confusing
my customers!

Is there a way round it?

Ben
 
T

Teemu Keiski

Hi,

that's how Server.Transfer works. Use Response.Redirect to keep the URL up.
 
B

Ben Fidge

Hi

I understand how and why it works, but really like using the Context object
to pass data between forms. I was hoping there would be a way to force the
correct page name to be shown in the address bar.

Ben
 
C

Christopher Reed

You can set the title as a server-side HTML control and programmatically
changed the title text in the Page_Load.
 
B

Ben Fidge

Hi Christopher,

Surely that will only update the page title in the IE window title bar, and
not the address bar.

Ben
 
G

Giorgio

The best is to upgrade to asp.net 2.0 and then use PostBackURL to
achieve what you want. You can post to another page, the URL will be
shown has the other page AND the best of it all your controls and
viewstate will be available on the page that you post to so basically
it transfers all the controls from the previous page, great isn't it?
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top