string Filename =
System.Web.HttpContext.Current.Server.MapPath(@"~\TextFiles\new.txt");
FileStream
fs = null;
StreamWriter
sw = null;
try
{
fs = new
FileStream(Filename, FileMode.Append, FileAccess.Write);
sw = new
StreamWriter(fs);
try
{
sw.WriteLine("Hello...!");
}
catch
{ }
finally
{ sw.Flush(); sw.Dispose(); sw.Close(); fs.Close(); }
}
catch { }





0 comments:
Post a Comment