What is the alternative to Response.Redirect () asp.net?

Hi One of the tips on “site performance tips” across blogs says “Avoid redirects.” In my case, I use Response.Redirectfor the same page. I submit the request and display the relevant information to the user.

Response.Redirect("FinalPage.aspx?NextID=" + ID);

So, in our business logic, I reload the same page with different information.

So how do I avoid redirects? Is there any other alternative? By the way, my goal is to achieve some performance there.

+5
source share
5 answers

- R PRG, . .

, - : " Server.Redirect() Server.Transfer() ?". Transfer, -, . , Transfer Redirect, , ASP NET MVC, .

PRG, , . , F5 .

+6

.

- , , (.. ).

+3

Server.Transfer, , . , , .

, - , .

0

"", , , ; ( , , ), , " ", , .

, -. , "form", , LinkButton, , . MultiView, ASCX, (, , , ).

0

I think that if you want to redirect to the same page, instead of having to do Response.Redirect("FinalPage.aspx?NextID=" + ID);, you can use NextIDin a ViewStatewell, or Hidden Fieldthat you did not have to redirect SAME page, and then verify that Hidden Fieldor ViewStateinstead of checkingQueryString

: D

0
source

All Articles