Good to all. I'm trying to redirect from one Actionresult to another and have tried everything ever without success. At this point I find the following code:
[AllowAnonymous]
public ActionResult Index_GA_ER(string tkn)
{
return RedirectToAction("Index", "Eresults_Base");
}
[ChildActionOnly]
public ActionResult Menu()
{
var menuOptions = Session.GetDataFromSession<List<Menu>>(StoreManagerKeys.Menus);
string tkn = "";
string a = "Eresults_MenuOption_";
if (ConfigurationManager.AppSettings["generateInterfeatures"] != "true" || menuOptions != null)
{
foreach (var button in menuOptions)
{
string b = RemoveDiacritics(button.Description).Replace(" ", "_");
button.MenuClass = a + b;
}
return PartialView(menuOptions);
}
return Index_GA_ER(tkn);
}
For which I have the error
Child actions are not allowed to perform redirect actions.
Can anyone help?