Render PDF File onto Client's Browser
Generic Procedure for Rendering given file to Client's Browser : protected void WriteToResponse( string fileName, bool saveAsFile, string fileFormat, System.IO. MemoryStream stream) { if (Page == null Page.Response == null ) return ; string disposition = saveAsFile ? "attachment" : "inline" ; Page.Response.Clear(); Page.Response.Buffer = false ; Page.Response.AppendHeader( "Content-Type" , string .Format( "application/{0}" , fileFormat)); Page.Response.AppendHeader( "Content-Transfer-Encoding" , "binary" ); ...