什么是ASP.NET应用程序中的.ashx文件? [英] What are .ashx files in an ASP.NET application?
问题描述
何时在asp.net Web应用程序中使用ashx文件?有人能用一个简单的例子用简单的术语来解释吗?我从msdn中了解到.ashx文件实现了ihttphandler,但是从这里 http://msdn.microsoft.com/en-us/library/system.web.ihttphandler.aspx ,有人可以为我清楚地解释吗?
When do you use ashx files in asp.net web application ? Can some one explain in simple terminology with a pratical example ? I understood from the msdn that .ashx files implements ihttphandler but i could not get much explanation from here http://msdn.microsoft.com/en-us/library/system.web.ihttphandler.aspx, Can some one explain it clearly for me?
推荐答案
简而言之,文件ASHX是ASPX文件,减去所有管道ASP.NET Webform.
In short, a file ASHX is an ASPX file, minus all plumbing ASP.NET webform.
我正在使用ASHX即时生成PDF文件,然后下载它们.同样,我使用它们来动态生成缩略图并下载.
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.
这对于空白的ASPX可能效果很好,但是ASHX文件的资源消耗要少得多.
This could work very well with a blank ASPX, but ASHX files are much less resource-consuming.
看看本教程,看看如何ashx文件.
Take a look at this tutorial to see how the files ashx.
这篇关于什么是ASP.NET应用程序中的.ashx文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!