1

What is the purpose of ASP.NET Handler (.ashx files) and how best can they be used?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Gali
  • 14,511
  • 28
  • 80
  • 105

1 Answers1

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