MyException - 我的异常网
当前位置:我的异常网» 编程 » sharepoint 2010 获取资料小图标地址get document i

sharepoint 2010 获取资料小图标地址get document icon url

www.myexceptions.net  网友分享于:2013-04-10  浏览:4次
sharepoint 2010 获取文件小图标地址get document icon url

SPSite site = new SPSite("http://sharepoint-dev");

SPWeb web = site.OpenWeb("Documents");

string StrFileName = SPUtility.ConcatUrls

                (

                    "http://sharepoint-dev:8002/Documents",

                    "http://sharepoint-dev:8002/Documents/DocLib/基本制度/交换机E.docx"

                );

string docsicon = SPUtility.ConcatUrls("/_layouts/images/",SPUtility.MapToIcon(web, StrFileName, "", IconSize.Size16));

string IconUrl = docsicon;

输出的是"/_layouts/images/icdocx.png"

 

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有