Write file (C#) : Write File « Response « ASP.Net






Write file (C#)

<%@ Page Language="c#" %>
<html>
  <body>
    <H2>Response.WriteFile()</H2>
    <%;
    string FileName;

    //make sure the text file is in the correct place.

    FileName = "file.txt";
    Response.WriteFile(FileName);
    %>
  </body>
</html>


           
       








Related examples in the same category

1.Writing a file to output (VB.net)
2.Read data from text file (C#)
3.Read file and display its content on the page (VB.net)