Display word document in web page
-
hi everybody i have looked evrywhere but cant find the solution for this.... i want to display word document stored in sql database and i want to show that document in browser....please help of point me in right direction thanks in advance...
appu
-
hi everybody i have looked evrywhere but cant find the solution for this.... i want to display word document stored in sql database and i want to show that document in browser....please help of point me in right direction thanks in advance...
appu
Hi Appu, I assume you have saved the word doc in the SQL Server as a byte array... and here is the code.. byte[] byteArray = //Get your byte array - ( file content )and assign it here. string sFileName = //Get your fileName and assign it here Response.AppendHeader("Content-Type", "application/msword"); Response.AddHeader("Content-Disposition", "attachment; filename=" + sFileName); Response.BinaryWrite(byteArray); Response.End(); Hope it works Thx, Gayani