How to use Generic Handlers (ASHX) in ASP.NET MVC?

后端 未结 2 759
予麋鹿
予麋鹿 2021-01-30 11:51

I need a image generator in my ASP.NET MVC application, but I don\'t know if it is possible to use ASHX in ASP.NET MVC.

If there is an class similar to IHttpHandler that

2条回答
  •  梦如初夏
    2021-01-30 12:21

    You should just be able to return the image from the action? See here for more.

    And yes, you can use ashx alongside MVC (by telling it to ignore the route) - but I'm not sure that is the best approach unless it is to re-use existing code.


    Sorry guys, the link has been removed. It happens.

提交回复
热议问题