Writing to Output Stream from Action

前端 未结 5 717
悲&欢浪女
悲&欢浪女 2020-11-29 04:13

For some strange reasons, I want to write HTML directly to the Response stream from a controller action. (I understand MVC separation, but this is a special case.)

C

5条回答
  •  一生所求
    2020-11-29 04:27

    If you don't want to derive your own result type, you can simply write to Response.OutputStream and return new EmptyResult().

提交回复
热议问题