tags:

views:

42

answers:

1

I asked a question regarding how to display aspx and cs code on page,

One answer was to convert to string and display in textbox.

Is there a function in C# ASP.NET which allows to convert file contents directly to a string?

+2  A: 

Use System.IO.File.ReadAllText().

Hans Passant