Thursday, July 10, 2025

How to create and download txt file programaticaly with asp.net c# and write content in it

   Response.Clear();

        Response.Write("This is an HttpHandler Test.");

        Response.Write("<p>Your Browser:</p>");


        Response.AddHeader("content-disposition", "attachment; filename=t.txt");

        Response.End(); 

No comments:

Post a Comment