Click here to Skip to main content
15,299,443 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Redirect to action method is not working but redirect is working fine

return RedirectToAction("about", "home");
              return Redirect("~/Home/About");

don't know what was the reason behind that

My routeconfig is as below :

    name: "Default",
    url: "{controller}/{action}/{id}",
    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }

event this is also not working
@using (Html.BeginForm("Upload", "fileupload", FormMethod.Post, new { enctype = "multipart/form-data" }))

Just redirecting to error page saying : The RouteData must contain an item named 'path' with a non-empty string value
Updated 7-Aug-21 6:23am
AmitGajjar 17-Jul-13 1:36am
change action="about" in your routeconfig.

I don't know why it was redirecting to error Page : but in sample application it was working fine
Nirav Prabtani 17-Jul-13 2:03am
dont post it here mention it as comment this is not an answer. please remove it.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

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