Hi I am trying to create one common ActionResult that can return redirectToAction with dynamic ActionName, ControllerName and object Parameter if any
public ActionResult partner()
{
//Building my params
obj.parameters = string.Format("cId = {0}, aId= {1}", CustomerID, Session["LocationId"]);
return RedirectToAction(obj.actionName, obj.controllerName, string.IsNullOrEmpty(obj.parameters) ? null : new { obj.parameters });
}
I am not sure if this is possible in MVC. Did any one had such requirement? is there any work around to achieve something like this.