如何在ASPX页面中显示Sharepoint文档? [英] How to show Sharepoint document in ASPX page?

查看:61
本文介绍了如何在ASPX页面中显示Sharepoint文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对我有一个要求.我有sharepoint网站.在文档库中,加载了一些文档.

文档的完整可搜索路径在我的ASPX页面中作为超链接加载.实现了.

单击链接后,我要做的就是获取内容并写在ASPX页面中.如何实现呢?请指导我.

There is a requirement for me. I''ve sharepoint site. In the document library, some documents are loaded.

The documents full searchable path is loaded as hyperlink in my ASPX page. This is achieved.

Upon clicking the link, what I would like to do is that I would get the content and write in an ASPX page. How to achieve this? Please guide me.

推荐答案

使用iframe.当用户单击链接时,将要使用的URL传递到您的.aspx页.在Page_Load中,获取此网址并将其加载到iframe中.

例如,下面给出的必须位于.aspx页中

Use an iframe. When the user clicks the link, pass the url to be used to your .aspx page. In Page_Load, get this url and load it in to the iframe.

For example, given below has to be in the .aspx page

<iframe id="embeddedContent" runat="server" width="98%" height="1000"></iframe>



然后在后面的代码中,您可以做



Then in your code behind, you could just do

protected void Page_Load(object sender, EventArgs e)
{
   embebeddedContent.Attributes["src"] = "some_url"; // the url passed to you.
}


这篇关于如何在ASPX页面中显示Sharepoint文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆