我有这个链接
@Ajax.ActionLink("create poll question",
"CreatePoll",
new { id = Model.DebateID },
new AjaxOptions
{
UpdateTargetId = "poll-entry-box",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET"
})
它指向具有 [Authorize] 属性的操作。登录有效,但 returnURL 为空,因此它只是重定向到索引页面。
有没有办法手动设置 returnURL ?
笔记
我正在使用此处描述的方法http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx因为正在加载登录页面在我的偏里面。