aleksandar ruba

aleksandar ruba

  • NA
  • 33
  • 25.5k

Read from txt file

Jan 8 2012 7:29 AM
good day all.
I have a question and if someone now i be grateful.
I have a txt file and i wright in some data from  multiline textbox
and the data are wright in, in multiple line.
this data I display in literal control but the data are display in one line.

 FileStream fs = new FileStream(Server.MapPath("baza.txt"), FileMode.Open);
        StreamReader sr = new StreamReader(fs);


        string txt = sr.ReadToEnd();
        sr.Close();
        fs.Close();
        Literal1.Text = txt;

txh aleksandar!

 

Answers (9)