I am calling an action method from a Ajax.ActionLink
as follow:
@Ajax.ActionLink("By Biggest price"), "CatSearch",
new { sortBy = "PriceBiggest" },
new AjaxOptions() { HttpMethod = "GET", OnBegin = "$('#ajaxReplace').hide();", OnComplete = "$('#ajaxReplace').show();", LoadingElementId = "busyDiv", UpdateTargetId = "ajaxReplace" },
new { @class = "btn btn-xs btn-warning boxShadow", @style = "margin-top: 5px;" })
This part works fine! Since my ProductController
has an [Authorize]
attribute well the user is redirected to the login page and its alright also. Post/After a success login I want to redirect to my Controller Action (same url as before login that was rendered by the ajax.actionlink
)
The action returns a PartialView
using but the problem is that when I redirect to the PartialView
it doesn't inherit the _Layout page most probably because it wasn't called from the parent.
I am not sure how to approach. I am sure there's something very easy and simple. I tried few things like window.location/javascript
.. If only I could simulate after the success login the same call as the ajax.actionlink
! :(
Any ideas, help please?