string fileName = @"C:\Users\test1.pdf"; byte[] buff = null; FileStream fs = new FileStream(fileName, FileMode.Open,FileAccess.Read); BinaryReader br = new BinaryReader(fs); long numBytes = new FileInfo(fileName).Length; buff = br.ReadBytes((int) numBytes); MemoryStream stream = new MemoryStream(buff); webBrowser1.DocumentStream = stream; webBrowser1.Show();
inline; filename
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)