一步一步webpart-创新显示指定文档库最新的文件列表的WebPart(5)
2006-09-21 09:54
441 查看
一.说明:
•创建一个显示指定文档库最新的文件列表的WebPart
•在WebPart定义可在浏览时让用户自行调整的属性
•在WebPart中访问SharePoint Object Model
二.开始创建
2.1新建项目"WebPartLibrary2"
2.2新建WebPart2.cs代码如下:
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.WebControls;//自己导入
namespace WebPartLibrary2
2.3新建并配置WebPart2.dwp,修改WebPart2.dwp文件代码如下:
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
<Title>李燕平的webpart2</Title>
<Description>第二个webpart</Description>
<Assembly>WebPartLibrary2</Assembly>
<TypeName>WebPartLibrary2.WebPart2</TypeName>
<!-- Specify initial values for any additional base class or custom properties here. -->
</WebPart>
2.4修改SPS虚拟站点的web.confi文件
增加<SafeControl Assembly="WebPartLibrary2" Namespace="WebPartLibrary2" TypeName="*" Safe="True" />
修改 <trust level="WSS_Minimal" originUrl="" />为<trust level="WSS_Medium" originUrl="" />
2.5将WebPartLibrary2.dll拷贝到 SPS虚拟站点根目录的“bin”目录中
2.6导入webpart ( 参见一步一步webpart-如何利用.net制作第一个webpart?(3) )
2.7将导入的webpart显示到页面(参见一步一步webpart-如何利用已导入的webpart?(4) )
....显示出现错误,修改中......
•创建一个显示指定文档库最新的文件列表的WebPart
•在WebPart定义可在浏览时让用户自行调整的属性
•在WebPart中访问SharePoint Object Model
二.开始创建
2.1新建项目"WebPartLibrary2"
2.2新建WebPart2.cs代码如下:
using System;
using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebPartPages;
using Microsoft.SharePoint.WebControls;//自己导入
namespace WebPartLibrary2
2.3新建并配置WebPart2.dwp,修改WebPart2.dwp文件代码如下:
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns="http://schemas.microsoft.com/WebPart/v2" >
<Title>李燕平的webpart2</Title>
<Description>第二个webpart</Description>
<Assembly>WebPartLibrary2</Assembly>
<TypeName>WebPartLibrary2.WebPart2</TypeName>
<!-- Specify initial values for any additional base class or custom properties here. -->
</WebPart>
2.4修改SPS虚拟站点的web.confi文件
增加<SafeControl Assembly="WebPartLibrary2" Namespace="WebPartLibrary2" TypeName="*" Safe="True" />
修改 <trust level="WSS_Minimal" originUrl="" />为<trust level="WSS_Medium" originUrl="" />
2.5将WebPartLibrary2.dll拷贝到 SPS虚拟站点根目录的“bin”目录中
2.6导入webpart ( 参见一步一步webpart-如何利用.net制作第一个webpart?(3) )
2.7将导入的webpart显示到页面(参见一步一步webpart-如何利用已导入的webpart?(4) )
....显示出现错误,修改中......
相关文章推荐
- 一步一步webpart-创新显示指定文档库最新的文件列表的WebPart(5)
- Andriod全盘扫描指定文件并动态显示到列表上
- 在SD卡指定文件夹下搜索ogg文件,列表显示,点击播放
- PowerShell获取指定目录下文件列表和大小并保存成txt文档
- 显示指定文件列表中文件的全路径
- IE浏览器中,在文档管理系统中上传文件的时候,系统文件列表中没有显示新上传的文件名称,是咋回事?
- <input type="file" />浏览时只显示指定文件类型
- 如何将mp3文件以列表的形式显示出来?
- 一步一步SharePoint 2007之四十六:实现Excel Service(1)——创建Excel文档列表(转)
- Linux ls --显示文件目录列表
- MFC单文档中显示本地某路径中的所有文件
- 以树状形式显示指定目录下的文件和文件夹
- Linux下搜索指定目录下文件中特定字符串并高亮显示匹配关键词
- Linux下的文件操作命令(二、匹配、排序及显示指定内容的命令)
- 设置tomcat显示文件列表
- sharepoint webpart 文档列表树 下载
- input="file" 浏览时只显示指定excel文件,筛选特定文件类型
- C# 上传文件到指定目录,单击下载文件,删除指定目录文件,打开文件列表
- SharePoint 2013 树形导航菜单,读取指定文档库下的文件夹和文件(非JS部分)
- mfc打开并显示指定文件