AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Display streamed data in Textbox
Posted by sadashivudu on  11/1/2012 1:04:06 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
Hi,

When i tried to Read data from .docx file and display it into Textbox the data is not displaying correctly all special charaters are displaying, please find the below code and help me some one ASAP.

FileStream fstream = new FileStream(filename, FileMode.Open, FileAccess.Read);
StreamReader sreader = new StreamReader(fstream);
strbuild.Append(sreader.ReadToEnd());
txtFileContent.Text =strbuild.ToString();

Post Your Reply Post New Question

 Viewer's Reply
Reading MS Word Document in Asp.Net
Answered By Moderator1 on 11/15/2012 6:49:12 AM
Hi,

Using FileStream class to read the word document might not be the proper way. MS Word has rich functions and features. In order to bring the complete content in its own format, You have to use Microsoft.Office.Interop.Word.Application. Please try and if you find any solution kindly post it for others to use.
Thank you.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Many .NET teams are underperforming, is yours?
When Good HTML Goes Bad: How You Can Protect Your Web Applications
Take Advantage of Oracle's 2 Day DBA Course