HttpResponse.AppendHeader Method
Assembly: System.Web (in system.web.dll)
If you use the AppendHeader method to send cache-specific headers and at the same time use the cache object model (Cache) to set cache policy, HTTP response headers pertaining to caching (Cache-Control, Expires, Last-Modified, Pragma, and Vary) might be deleted when the cache object model is used. This behavior enables ASP.NET to maintain the most restrictive settings. For example, consider a page that includes user controls. If those controls have conflicting cache policies, the most restrictive cache policy will be used. If one user control sets the header " Cache-Control: Public " and another sets the more restrictive header " Cache-Control: Private " via calls to SetCacheability, then the " Cache-Control: Private " header will be sent with the response.
The following code example calls the AppendHeader method to add a custom header to the HttpResponse object sent to the requesting client.
get_Response().AppendHeader("CustomAspNetHeader", "Value1");