Home » ASP.NET » The difference between ASPX page and ashx

The difference between ASPX page and ashx

HTML (HTM): to explain by the browser (translation) code is displayed to the user browsing. Therefore, it almost does not occupy the resources of the server can be sent directly to the requester, the requester by browser is responsible for the interpretation of.



Aspx: by the server in the.Net compiler to interpret, translated into HTML, and then sent to the requester.



.ashx: by the server in the.Net compiler and is responsible for the interpretation, translation into the specified content, and then sent to the requester.



The difference between ASPX and ashx is that ASPX is a large container with life cycle (its interface properties), which includes the creation, initialization, loading, unloading and redraw, process (whether you use or not these processes). Ashx does not exist in the interface, compared with ASPX, occupy very little resources, too more flexible. So it is called: General.
process


Usually if necessary, we should use the ashx. for example, when you need to use ajax to call the server content, generally do not create.Aspx files to get content, and use the.Ashx file to access the content, to ensure that the resources consumed at least.

Latest