SharePoint2010:从用户控件中打开文档 -Open document(s) in Office web apps (from User controls)
As I understand, you want to show the Office documents using Office Web Apps. Instead of using the ECB actions, you want to open it using Hyperlink, am I right?
When you try to view the word document in Brower, you will get a url like this:
http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx&source=..
In your custom Hyperlink, only the ‘id’ parameter is needed. So the link like this: http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx.
Word: http://servername/_layouts/WordViewer.aspx?id=/Shared%20Documents/test.docx.
Excel: http://servername/_layouts/xlViewer.aspx?id=/Shared%20Documents/test.xlsx.
作者:johnny
出处:http://www.cnblogs.com/sunjunlin
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。