9
Answers

Read from txt file

aleksandar ruba

aleksandar ruba

13y
3.5k
1
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)