When will I use Server.Transfer via PostBackURL?

Or vice versa.

Update:
Hmm, let's say I have an application for a shopping cart, the user clicks the "Checkout" button. The next thing I want to do is send the user to the Invoice.aspx page (or similar). When a user types a check, I could Button.PostBackURL = "Invoice.aspx"
or I could do
Server.Transfer("Invoice.aspx")

(I also changed the name, since the method is called Transfer, not TransferURL)

+3
source share
3 answers
  • Server.TransferURL HTTP . , , . Server.Transfer , script "", " ".
  • PostbackURL HTTP-, , URL , , .

, ", ", , PostbackURL.

, .

+6

Server.Transfer . Postback , URL- .

Perhaps you wanted to compare with Response.Redirect, which forces the client to send a new request for a new URL.

+1
source

All Articles