Problem :- I am dealing with doc,.docx,xls,.xlsx, Pdf, files with in a ASP.NET application.,
While I am clicking a button of Gridview, I need to open that file with in IE 6.0/7.0 BROWSER window., Office files like .docx, .doc, .xls, .xlsx , asking for open and save .. or Opening out side of the BROWSER. Browser getting close automatically..开发者_Python百科
But for pdf its working fine..
Code: Response.Clear(); Response.ContentType = "application/pdf"; strFilePath= Response.WriteFile(strFilePath);
SAME CODE USED - with the content type of "application/msword";
But instaed of opening with in browser, its opening out side and automatically, Browser getting closed.
Could you please help me on this..
Thanks Karthikeyan
You need webdav server. It serves content on top of HTTP protocol (webdav uses http and adds special methods to standard POST and GET), and Word is Webdav client. That means word understand it has to save to HTTP destination, not on local file system. Example of this can be seen in DMS (document management systems) like Sharepoint.
精彩评论