server.transfer

How to simulate Server.Transfer in ASP.NET MVC?

送分小仙女□ 提交于 2019-11-26 01:26:19
问题 In ASP.NET MVC you can return a redirect ActionResult quite easily : return RedirectToAction(\"Index\"); or return RedirectToRoute(new { controller = \"home\", version = Math.Random() * 10 }); This will actually give an HTTP redirect, which is normally fine. However, when using google analytics this causes big issues because the original referer is lost so google doesnt know where you came from. This loses useful information such as any search engine terms. As a side note, this method has the