I know how to do redirect from parent controller, suppose I have
public class _ParentController : Controller {
...
}
public class HomeController : _ParentController {
...
}
I can add a method to _ParentController:
protected override void OnActionExecuting(ActionExecutingContext filterContext) {
if (condition) {
filterContext.Result = Redirect(path);
}
}
Now I need to return a view or do Server.Transfer (I need to preserve the url). Server.TransferRequest doesn't work for me in this case, is there any other way to do what I need? I use .NET MVC3 and IIS7.5
Thanks.
filterContext.Result = View(somePameter);?hot to doredirect from parent controller, suppose I have " is ithow to do?