Server.Transfer only preserve the original url for 1 hop

R

Ryu

Hi, it seems that Server.Transfer only preserve the url only for 1 hop. For
example I have A.aspx, B.aspx and C.aspx. If i do a server.transfer at
A.aspx to B.aspx
Server.Transfer("B.aspx") the URL at B.aspx will be "A.aspx". However if I
Server.Transfer("C.aspx") from B.aspx, my URL will be changed to B.aspx
instead of A.aspx. Is this suppose to happen or did I forgot to turn on
something?
 
W

William F. Robertson, Jr.

It would seem this is normal behavior. When you do the first server
transfer, the client machine is making a request to A.aspx, but B.aspx is
being sent page. The <form action> is equal to B.aspx. So when a postback
occurs, the address the client is posting to is B.aspx, with the
Server.Transfer, C.aspx is being sent back. The client browser posted the
form to B.aspx so the address will reflect that.

HTH,

bill
 
R

Ryu

Wow....I always thought that the URL will remain the same thorughout. Thanks
for enlighting me
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top