Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The following examples are redirects wich we're trying.
The first one, for user login, works, after that no redirect works.
I have no idea about what may be the cause, tried redirecttoroute too, it is like if the server wasn't sending the headers or anything.
I have no sniffing software to check this out.

UrlHelper uH = new UrlHelper(new RequestContext(this.HttpContext, this.RouteData), RouteTable.Routes);
Response.Redirect(uH.Action("TrabalheExperiencia", "Contact"), true);
return this.RedirectToAction("TrabalheExperiencia");
return RedirectToAction("TrabalheExperiencia");
Posted

1 solution

wrote:
Response.Redirect(uH.Action("TrabalheExperiencia", "Contact"), true);


This is a redirect, all you need to check in your debugger is what uH.Action calls return

wrote:
return this.RedirectToAction("TrabalheExperiencia");
return RedirectToAction("TrabalheExperiencia");


This is calling a method added by you or a framework you use. You'd need to debug that to work out why it's not doing a redirect. I assume it's supposed to use this string to work out the page to go to. I assume you wrote this because I can't imagine that a framework would make the mistake of accepting strings like this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900