TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cien S
NA
19
0
Display the content of .doc file
Dec 28 2009 5:34 AM
Hi,
Need some help with an problem that bugging me..
I have to open a .doc file at the client side when the user clicks a button.
Opening is not a problem.. I am able to do it using the following code
which is executed when the user clicks on the button
my code:
byte[] imagecontent = (byte[])(drd[0]);
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + drd.GetValue(1).ToString());
Context.Response.BinaryWrite(imagecontent);
The problem is that the user first sees a 'Open/ Save / Cancel' dialog box. Only when the user clicks on 'Open' does the .doc file get opened.
Am at a loss and any help will be appreciated.
Thanks
Reply
Answers (
1
)
Youtube in windows application
C#.net/ codes/links for build : Compose Box