Hi! How I can use instead filepath rich textbox in below code?
// Read the file and convert it to Byte Array
string filePath = Server.MapPath("APP_DATA/TestDoc.docx");
string filename = Path.GetFileName(filePath);
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);
br.Close();
fs.Close();
it’s my requirement :
FileStream fs = new FileStream(richTextBox1.Text, FileMode.Open, FileAccess.Read);