txt_box.Text = ""; if (FileUpload1.HasFile) { string ServerMapPath = Server.MapPath("~//images//" + FileUpload1.FileName); FileUpload1.PostedFile.SaveAs(ServerMapPath); //string x1=FileUpload1.PostedFile.InputStream.ToString(); //Response.Write(x1); StreamReader sr = new StreamReader(ServerMapPath); string file_data; string sb = ""; while ((file_data = sr.ReadLine()) != null) { //Response.Write(file_data); sb = sb + file_data; } txt_box.Text = sb; sr.Close(); File.Delete(ServerMapPath); } else { txt_box.Text ="Upload a file then click"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)