Server.transfer a second time change URL

I am using Asp.net 2.0. I am doing server.transferfrom page 1 to page 2. The URL remains on page 1. Now I click on the link on page 2 and this will take me to page 3. So the URL should remain on page 1. Instead, the browser now displays Page URL 2. Is this expected behavior?

I really tried to hide the parameters from the URL.

  • I can not use response.redirectbecause I can not access the previous page here.
  • I tried using PostBackUrl, but this will not work for me, because I need to save the data on the current page, and then show the next page if there were no errors. If the data was incorrect and / or there were errors, then I need to show the user the same page.
  • Now I decided to try server.transfer, but this shows the URL of the previous page.

Can someone point me in the right direction?

+5
source share
1 answer

This is the expected behavior.

Server.Transfer, ASP.NET ThreadAbortException, . . Server.Transfer. , , , 1, - , , , 2.

Postbacks - , url 2 , . 2 , 2. 1, 1 , viewstate form, 2. <form>, page2, action of page2. html Server.Transfer, :

<form name="aspnetForm" method="post" action="Page2.aspx" id="aspnetForm">

-, URL- , 2 , 1 1, .

, . ajax, URL- , .

ASP.NET MVC, URL- REST, , .

+1

All Articles