What is the difference between HttpContext.Current.Response and Page.Response?

I am trying to fix a caching issue on a set of secure pages and realized that the title should be changed for all answers. When I put together the solution, I want to know the difference between HttpContext.Current.Response and Page.Response and when each object should be used in the application.

Thanks.

+3
source share
2 answers

Page.Response is just a mapping to an HTTPContext when you are in the context of an HTML page.

HttpContext.Current.Response , . , , .

? , "" HttpContext.Current.Response , , Page.Response, /usercontrol.

+8

. PageResponse , , , HttpContext - , Global.asax HttpModule/HttpHandler.

+3

Source: https://habr.com/ru/post/1721925/


All Articles