1

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

p.campbell
  • 95,348
  • 63
  • 249
  • 319
Gali
  • 13,941
  • 26
  • 79
  • 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
  • 59,075
  • 9
  • 102
  • 128
  • 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