How can i get the Content-Length from Response headers in MVC controller or after the Stored Procedure execution RRS feed

  • Question

  • User733480023 posted

    Hi All,

    I need to get the Content-Length from Response before return to the View.

    Where can i achieve in C#, In controller or after Stored Procedure call.

    i am passing multiple parameters to the Procedure and calling the Procedure using SqlDataReader.

    Can you please help me.


    Wednesday, January 27, 2021 12:17 PM

All replies

  • User-474980206 posted

    you question does not make sense. The response is typically build by the view using the model data created by the controller. Th response content length will not be known until the view has generated the content (long after the action runs). 

    Wednesday, January 27, 2021 11:10 PM