NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Fri
1
Jun '07

Download any file from ASP.NET

You know, some formats (txt, gif etc.) will be shown on the browser rather than downloading when we try. Below is the script which will help you to download any file.


 
        Response.Clear();
        Response.AddHeader(“Content-disposition”, “attachment; filename=<filename>”);
        Response.WriteFile(“C:\</filename><filename>”);
        Response.End();
</filename>


The same logic is used in any server language.
'

Error Logging Modules and Handlers - Elmah

ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.


Check these resources: http://code.google.com/p/elmah/

http://msdn2.microsoft.com/en-us/library/aa479332.aspx
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Kerala Microsoft Users Group Community Website