欧非资源网:安全、免费、专业放心的资源下载站! 最新软件|软件分类

您的位置:欧非资源网 > 其他专区 > SharePoint > 如何找到SharePoint List的Template ID

如何找到SharePoint List的Template ID

时间:2020-01-15 22:00作者:admin来源:未知人气:303我要评论(0)

我们可以利用Visual Studio2010结合owssvr.dll来找到我们指定的Sharepoint List所使用的Template的ID值。
  OWSSVR.DLL实际上是一个在IIS中注册了的ISAPI extension, 它的方法可以直接通过对/_vti_bin/owssvr.dll的Http访问来调用. 许多Office应用程序(Word, Excel, InfoPath, SharePoint Designer等)就是通过对OWSSRV进行直接的http调用才完成于SharePoint服务器之间的远程整合,而此处我们则要用到它来实现寻找Template ID的目的。
  具体步骤如下(我们以确定某个WebPart Gallery的List的Template ID为例):
  一、使用Visual Studio2010确定List 的ID
在Visual Studio的Server explorer,新添加一个SharePoint connection,令此连接指向你的Sharepoint网站,eg   http://sp2010/.此Server explorer会给你显示出这个Sharepoint Farm的全部结构。虽然其内容是只读的,但对我们而言已足够了。在此结构内,找到我们需要的Sharepoint List(此处是一个Webpart Gallery),显示出它的Properties,在右侧的属性栏,找到ID的值(eg:9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k),Copy下来备用。

 

  二、使用OWSSVR.DLL确定Template 的ID
  根据前面取得的List ID,使用OWSSVR来取得其Template的ID,方法是:打开IE,在URL中输入下如下地址(还记得上面Copy的ID吧,把它放在地址的最后面):owssvr.dll
http://sp2010/_vti_bin/owssvr.dll?Cmd=ExportList&List=9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k
这样,你会取到一个 XML文档,在此文档中你就可以找到你想要的东西了。(如下面XML内容的红色部分)

 

List Name="{9f7d064f-d9s8-62f1-8a4f-b02c9f4c259k}" Title="Web Part Gallery" Description="Use this Web Part Gallery to store and retrieve Web Parts. The Web Parts in this gallery are available to this site and all sites under it. To preview a Web Part, click its title." Direction="0" BaseType="1" ServerTemplate="113" Url="_catalogs/wp" HiddenList="TRUE" DisableAttachments="TRUE" FolderCreation="FALSE" AlwaysIncludeContent="TRUE" RootWebOnly="TRUE" Catalog="TRUE" AllowDeletion="FALSE" BrowserFileHandling="permissive" NoCrawl="TRUE" Version="1">
- <MetaData>
- <Views>
+ <View Name="{283335B7-DE62-4316-B3EF-14A46B17BF0F}" DefaultView="TRUE" Type="HTML" DisplayName="All Web Parts" Url="_catalogs/wp/Forms/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ToolbarTemplate="WebPartGalleryViewToolBar" ImageUrl="/_layouts/images/wlicon.png">

相关阅读 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database schema doesn't match the TargetSchema"的解决方案InfoPath Error “此文档库已经被重命名或删除,或者网络问题导致文件无法保存…” 的解决方案SharePoint 2013 App概述How to Shrink SharePoint Content Database Log File?Project Web App Feature无法开启的解决方案

文章评论
发表评论

热门文章 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”

最新文章 SharePoint中Office文件无法打开的解决方案如何快速生成SharePoint测试大文件 如何查询SharePoint Library中空文件夹?如何快速备份SharePoint Farm Solution如何解决Event Viewer中SharePoint Error - Event ID 8321SharePoint 2016 CU安装失败,"Exception: The upgraded database s

人气排行 SharePoint 2016 图文安装教程 后面有激活序列号、密钥分享[SharePoint入门教程]一SharePoint发展、工具及术语如何用 SharePoint Online创建团队网站?SharePoint Iframe 报错“此内容不能显示在一个框架中”SharePoint 2013 安装图解 SharePoint安装步骤图解教程SharePoint 如何开启访问请求[SharePoint入门教程]一SharePoint概述[SharePoint入门教程]一创建SharePoint母版页

盖楼回复X

(您的评论需要经过审核才能显示)