How to set the returnURL manually when using Ajax.ActionLink
Posted
by
Roge
on Stack Overflow
See other posts from Stack Overflow
or by Roge
Published on 2012-07-09T02:30:58Z
Indexed on
2012/07/09
3:15 UTC
Read the original article
Hit count: 265
I have this link
@Ajax.ActionLink("create poll question", "CreatePoll", new { id = Model.DebateID }, new AjaxOptions
{
UpdateTargetId = "poll-entry-box",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET"
})
which is pointing at a action with the [Authorize] Attribute. The login works, but the returnURL is empty so it just redirects to the index page.
Is there some way to manually set the returnURL ?
NOTE
I am using the method described here http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx because the login page was loading inside my partial.
© Stack Overflow or respective owner