如何使用带有aspnet样板的请求​​标头传递参数?

时间:2017-10-17 10:50:18

标签: asp.net-mvc login aspnetboilerplate

this问题之后,现在我想在重定向请求的标头中传递用户名。代码是这样的:

return Json(new AjaxResponse { TargetUrl = returnUrl });

有没有办法使用这个AjaxResponse或类似的东西呢?

1 个答案:

答案 0 :(得分:0)

我跟随了tienguyen的消化,我使用HttpContext.Current.Response.AppendHeader(headerkey, value);并且它运行正常!