[code language=”csharp”]
public void ReadFromFile()
{
string fullPath = System.Web.Hosting.HostingEnvironment.MapPath(FilePath);
if (System.IO.File.Exists(fullPath))
{
using (StreamReader sr = File.OpenText(fullPath))
{
Description = sr.ReadToEnd();
}
}
}
public void SaveToFile()
{
string fullPath = System.Web.Hosting.HostingEnvironment.MapPath(FilePath);
File.WriteAllText(fullPath, Description); //create / overwrite
}
[/code]