to try:
public ActionResult Index() { return RedirectToAction("actionName"); // or return RedirectToAction("actionName", "controllerName"); // or return RedirectToAction("actionName", "controllerName", new {/* routeValues, for example: */ id = 5 }); }
and in .cshtml :
@Html.ActionLink("linkText","actionName")
OR
@Html.ActionLink("linkText","actionName","controllerName")
OR
@Html.ActionLink("linkText", "actionName", "controllerName", new { }, new { })
Notification using null in the final expression is not recommended, and it is better to use empty new {} instead of null
Javad_Amiry Oct 25 '11 at 16:03 2011-10-25 16:03
source share