.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Dispalying .txt Files

Posted By: Aamrapali Tamgadge     Posted Date: December 29, 2010    Points:2   Category :ASP.Net
I want to display the data means whole content of my text file in next aspx page.

Author: Jean Paul             
Posted Date: December 29, 2010     Points: 5   

Create a new ASP.NET Application, and on the default page add a textbox named txt1.

Add the following code to page_load event

StreamReader reader = File.OpenText("c:\\file.txt");
txt1.Text = reader.ReadToEnd();

Jean Paul http://jeanpaulva.com/

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend