ashx files in asp.net

五迷三道 提交于 2019-11-30 06:35:40
Larry

In short, a file ASHX is an ASPX file, minus all plumbing ASP.NET webform.

I am using ASHX to generate PDF files on the fly, and download them. Similarly, I use them to generate thumbnails on the fly and download them.

This could work very well with a blank ASPX, but ASHX files are much less resource-consuming.

Take a look at this tutorial to see how the files ashx.

One use I use them for is to use it to handle AJAX requests, and print the output in plaintext format. There is no need to render any HTML controls etc, just plain text/XML etc, and ASHX seems best for that.

Here is a good overview:

http://www.dotnetperls.com/ashx

You want to create an ASP.NET file that is not a typical web forms page. Your file will need to dynamically return an image from a query string, or XML and other non-HTML web pages.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!