asp.net - Why are these HttpResponse methods not allowed in "asynchronous postback scenarios"? -


I was reading to get some more information about the HttpResponse class. Although I came up on a strange comment.

The following methods of the HttpResponse class are supported only in the postback scenario and are not in:

  Clear BinaryWrite ClearTontent Clearheaders Close End Flush TransmitType Write TypeFile WriteSubstubeStation    

What does this really mean? I depend heavily on HttpResponse. Write me in a project. What is actually a asynchronous postback scenario ?

An async postback occurs when you can post something like an updatePanel.

A large difference in Enscape postback is in the render.

Your normal prerender and render logic call will not be called.

Only a part of the page is updated at the front-end using Javascript.

This means that you can not return another document, change the http header, etc.

Comments