I am trying to insert an header in my controller according with the parameter sub
, but with no success. I have tried these two lines, here's the code:
public ActionResult Index(string sub)
{
if (!string.IsNullOrEmpty(sub))
{
HttpContext.Response.Headers.Add("sub", sub);
Response.AddHeader("sub", sub);
}
return View();
}