can i make html editor of asp.net ajax 2.0/3.5 to read a rtf file from a directory?
can i if yes then how please?
Yes, first; read file content.
// Specify file.
FileStream file = new FileStream(Server.MapPath("~\\files\\test.rtf"), FileMode.OpenOrCreate, FileAccess.Read);
StreamReader sr = new StreamReader(file);
// Read contents of file into a string
string cval = sr.ReadToEnd();
// Second; Set Content property of HTMLEditor.
htmlEditor.Content = cval;
// Close StreamReader
sr.Close();
// Close file
file.Close();