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
suresh
NA
293
0
Opening MS Word Document in asp.net
Jan 26 2012 1:36 PM
Hi,
My web page contains two button i.e
Collapse | Copy Code
<asp:button id="btnOpenword" runat="server" text="OpenFile">
<asp:button id="btnNext" runat="server" text="Next" visible="false">
when i click on the OpenFile Button i need to open the word document and also below the Next button should visible to the user.
so i write some code but it's working to open the word document, but it's not visible the Next button to the user.
Collapse | Copy Code
btnNext.Visible = true;
FileInfo file = new FileInfo("filename.doc");
Response.ClearContent();
Response.AddHeader("Content-Disposition", "inline;filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/msword";
Response.TransmitFile(file.FullName);
Response.End();
Plese give me solution it's urgent.
Thanks ,
Suresh
Reply
Answers (
1
)
ASP.NET Compiler
Opening Ms Word Document in asp.net