Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要知道Response.Clear()是清除内容还是删除标题?换句话说,如果我使用Response.Clear(),我是否也需要使用Response.ClearHeader()?
Response.Clear()
Response.ClearHeader()
正如MSDN所说
Clear 方法清除任何缓冲的 HTML 输出。但是,Clear 方法只删除响应正文;它不会删除响应标头。
清除标题使用Response.ClearHeaders();
Response.ClearHeaders();