简体   繁体   中英

How to convert a file to string directly using C# ASP.NET

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?

使用System.IO.File.ReadAllText()。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM