dotnet webhosintg
  
Home | DotNet Hosting | eCommerce Hosting | SQL Server Hosting| ADO DotNet | ASP DotNet | DotNet Tutorials | Contact Us  |
  
         
 

Your domain available ?
www.

BUY NOW
ASPNET 3.0 New
ASPNET 2.0
SQL SERVER 2005 HOSTING
GET LISTED IN GOOGLE
30 DAY MONEY BACK
OUR PARTNERS
TUTORIALS
WEB DESIGN TEMPLATES
 TERMS
 PRESS ROOM




 

 

Display File Content - ASP DotNet

Tutorial - Display File Content with ASP DotNet

In ASP.NET we can write the content of a file directly to the output stream
by using the writefile property of response object. The following ASP.NET code displays the content of any specified file on the client browser:


<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>

<html>
<body>
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
Response.writefile("mydatafile.txt")
End Sub
</script>
</body>
</html>

 

 

 

Stacks of web space and bandwidth with all packages

ASP Hosting £6/Month


.net hosting

.NET Hosting £10/Month
400MB


Copyright ©2002 DotNet Hosting UK, All rights reserved