Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi
I want to know about retrieving word documents from database.
I stored it in byte format. Now i want to render it in asp.net page
I tried all but not getting proper output
plz help
Posted

 
Share this answer
 
Comments
Sweetynewb 12-Feb-11 7:03am    
thanks for reply
but i tried that code
and it works fine
but it allows to download that document. and i want to display it to show the user

eager to get this....
This[^] detailed article might help you.
 
Share this answer
 
Comments
Sweetynewb 15-Feb-11 7:14am    
That article requires 2003 versions
i uses Visual Studio 2008 and Microsoft office 2007
and when i tried to follow the steps, given in that article, it gives error

i want to show word document like in Nukri or monster portal
what to do now?
Any help?
There can be two reasons why Om Prakash Pant's code examples only seem to let you download the documents. For the explorer to display the word document the server has to answer the browsers request with the appropriate mime type (I think it's something like application/ms-word but you can google that yourself) and you also need to have a Microsoft Word document viewer (doesn't have to be MS-Word Office) installed.

MS Word Viewer download: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3657ce88-7cfa-457a-9aec-f4f827f20cac&displaylang=en[^]

Best Regards,
Manfred
 
Share this answer
 
v2
Comments
Sweetynewb 15-Feb-11 7:06am    
I used mime type-"application/vnd.ms-word"
and microsoft viewer means?
I added references- Microsoft.Office.Interop.Word
Manfred Rudolf Bihy 15-Feb-11 9:44am    
The client system (were the browser runs at) needs some software installed that is capable of displaying a MSWord document. So the client PC needs either MS Word installed or the MS Work viewer please see my updated answer.
Sweetynewb 16-Feb-11 9:10am    
ok. client PC has MS Word installed so i think no need to install MS work viewer.
fjdiewornncalwe 17-Feb-11 8:51am    
+5. My vote for the correct answer. Mime type is certainly the issue here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900