Search code examples
asp.net-mvcauthenticationaspnetboilerplate

How can I pass parameters using request Header with aspnet boilerplate?


Following this question, now I want to pass the username in the headers of the redirection request. The code is this:

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

Is there some way to do that using this AjaxResponse or something like that?


Solution

  • I followed the sugestion of tienguyen and I used HttpContext.Current.Response.AppendHeader(headerkey, value); and it works fine!