How to know if the request is ajax in asp.net in Application_Error()

前端 未结 4 703
无人共我
无人共我 2021-02-07 19:58

How to know if the request is ajax in asp.net in Application_Error()

I want to handle app error in Application_Error().If the request is ajax and some exception is t

4条回答
  •  逝去的感伤
    2021-02-07 20:24

    it is possible to add custom headers in the client side ajax call. Refer http://forums.asp.net/t/1229399.aspx/1

    Try looking for this header value in the server.

提交回复
热议问题