What is the purpose of ASP.NET Handler (.ashx files) and how best can they be used?
Asked
Active
Viewed 5,598 times
1
-
The use can be an xml file render, an image render, a download file create on fly, a txt file for download create on fly... – Aristos Jan 10 '11 at 21:49
-
http://stackoverflow.com/questions/5758777/question-on-ashx-files-in-asp-net – techBeginner Dec 01 '11 at 19:33
1 Answers
6
An ASHX handler allows you a discrete http handler without the overhead of processing a page request (an ASPX file).

Matthew Abbott
- 60,571
- 9
- 104
- 129
-
1+1. It's also called a Generic Handler and is very useful for things like building out REST services or emitting files. – NotMe Jan 10 '11 at 21:35
-
thanks for the help, i added handler file - but how to run it from my default web page ? – Gali Jan 10 '11 at 21:58
-
You can call it like any other resource, e.g.: `` assuming your handler returns the content type that resource is expecting... – Matthew Abbott Jan 10 '11 at 22:00