G
Guest
I read a txt file with html. The openread event removes all the html tags.
Any ideas...?
public static string fileOpen(string fileName)
{
string mRet = string.Empty;
// Open the stream and read it back.
using (FileStream fs = File.OpenRead(fileName))
{
byte[] b = new byte[1024];
UTF8Encoding temp = new UTF8Encoding(true);
while (fs.Read(b, 0, b.Length) > 0)
{
//Trace.WriteLine(temp.GetString(b));
mRet = temp.GetString(b);
}
}
return mRet;
}
thanks
Any ideas...?
public static string fileOpen(string fileName)
{
string mRet = string.Empty;
// Open the stream and read it back.
using (FileStream fs = File.OpenRead(fileName))
{
byte[] b = new byte[1024];
UTF8Encoding temp = new UTF8Encoding(true);
while (fs.Read(b, 0, b.Length) > 0)
{
//Trace.WriteLine(temp.GetString(b));
mRet = temp.GetString(b);
}
}
return mRet;
}
thanks