hai,
how to read the file from a notepad and diplay it in a web page.
thank you
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Soft CornerPosted Feb 21, 2011, 5:32 AM
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
{