hai,
how to read the file from a notepad and diplay it in a web page.
thank you
About file concepts
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Soft CornerRank #1,221 · 1.5K reputationPosted Feb 21, 2011, 12:32 AM EST
First, you will need to import the System.IO namespace.
Use the ReadAllText method to opens a text file, reads all lines of the file, and then closes the file.
for e.g :-
protected void buttonDisplay_Click(object sender, EventArgs e)
{
FilePath = txtBoxInput.Text; //your file path in textbox1
if (File.Exists(FilePath))
{
else
{