You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ControllerExtensions you have method RedirectToActionJson, and you create url for redirect on this way: redirect = controller.Url.Action(action). You are using it like this: return this.RedirectToActionJson(nameof(Index));
This will not work if you want to redirect on action from another controller.
Mu solution is to change: redirect = controller.Url.Action(action) to redirect = action
and then to call it: return this.RedirectToActionJson(Url.Action("Action", "Controller"));
Do you maybe have some better suggestion?
The text was updated successfully, but these errors were encountered:
On Fri, Oct 5, 2018 at 5:10 PM Đorđe Đukić ***@***.***> wrote:
Hi Jimmy,
In *ControllerExtensions* you have method *RedirectToActionJson*, and you
create url for redirect on this way: redirect =
controller.Url.Action(action). You are using it like this:
return this.RedirectToActionJson(nameof(Index));
This will not work if you want to redirect on action from another
controller.
Mu solution is to change:
redirect = controller.Url.Action(action) to redirect = action
and then to call it:
return this.RedirectToActionJson(Url.Action("Action", "Controller"));
Do you maybe have some better suggestion?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#14>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAGYMq5cTfRUc-37-LFAzINN-XRLd7S7ks5uh9jigaJpZM4XK_v0>
.
Hi Jimmy,
In ControllerExtensions you have method RedirectToActionJson, and you create url for redirect on this way:
redirect = controller.Url.Action(action)
. You are using it like this:return this.RedirectToActionJson(nameof(Index));
This will not work if you want to redirect on action from another controller.
Mu solution is to change:
redirect = controller.Url.Action(action)
toredirect = action
and then to call it:
return this.RedirectToActionJson(Url.Action("Action", "Controller"));
Do you maybe have some better suggestion?
The text was updated successfully, but these errors were encountered: