Get text of uploaded file without saving to disc

protected void UploadButton_Click(object sender, System.EventArgs e)
{
 if (FileUpload1.FileName > "") {
  dynamic UploadedFileMemoryStream = new IO.MemoryStream(FileUpload1.FileBytes);
  string UploadedFileText = System.Text.Encoding.UTF8.GetString(UploadedFileMemoryStream.ToArray);
 }
}

No comments:

Post a Comment