江湖路
专注AJAX和Moss
摘要: 不多说,直接上代码: 1 var statusId = ''; 2 var notifyId = ''; 3 function AddNotification() { 4 notifyId = SP.UI.Notify.addNotification("Hello World!", true); 5 } 6 function RemoveNotification() { 7 SP.UI.Notify.removeNotification(notifyId); 8 notifyId = ''; 9 }10 function Ad 阅读全文
posted @ 2012-08-02 08:54 wengnet 阅读(611) 评论(1) 推荐(1) 编辑
摘要: 上传文件到SharePoint 1 if (File1.PostedFile == null) 2 return; 3 4 string destUrl = TextBox1.Text; 5 6 SPWeb site = new SPSite(destUrl).OpenWeb(); 7 8 Stream fStream = File1.PostedFile.InputStream; 9 byte[] contents = new byte[fStream.Length];10 11 fStream.Read(contents, 0, (int)fStream.Length);12... 阅读全文
posted @ 2012-07-27 14:11 wengnet 阅读(693) 评论(1) 推荐(0) 编辑
摘要: 遍历所有网站和列表 1 SPSite oSiteCollection = SPContext.Current.Site; 2 SPWebCollection collWebsite = oSiteCollection.AllWebs; 3 4 for (int i = 0; i < collWebsite.Count; i++) 5 { 6 using (SPWeb oWebsite = collWebsite[i]) 7 { 8 SPListCollection collList = oWebsite.Lists; 9 10 for (int... 阅读全文
posted @ 2012-07-26 15:35 wengnet 阅读(643) 评论(1) 推荐(1) 编辑
摘要: 直接上Code:XML1 <CustomAction2 GroupId="PersonalActions"3 Id="bac2275f-3512-4ca0-b0c1-6e47907b2bd0"4 Location="Microsoft.SharePoint.StandardMenu"5 ControlAssembly="你的程序集"6 ControlClass="动态创建菜单的类名字"7 >8 </C... 阅读全文
posted @ 2012-07-13 15:10 wengnet 阅读(436) 评论(1) 推荐(0) 编辑
摘要: 在PowerShell中注册SharePoint程序集Add-PSSnapin Microsoft.SharePoint.PowerShell获取所有在PowerShell中注册的程序集:Get-PSSnapin –Registered 阅读全文
posted @ 2011-03-07 17:14 wengnet 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Get-Command –PSSnapin “Microsoft.SharePoint.PowerShell” | format-table name > C:\SP2010_PowerShell_Commands.txtGet-Command –PSSnapin “Microsoft.SharePoint.PowerShell” | select name, definition | format-list > C:\SP2010_PowerShell_Commands.txt 阅读全文
posted @ 2011-03-07 16:25 wengnet 阅读(429) 评论(0) 推荐(0) 编辑
摘要: [代码]注意:其中“STS#1”为空白站点模板,“STS#0”为团队站点模板 阅读全文
posted @ 2011-01-21 14:20 wengnet 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 在开发环境中,SharePoint2010和数据库是分开装的,当使用SharePoint Designer创建外部内容类型的时候,出现了此错误"The Business Data Connectivity Metadata Store is currently unavailable"; 搜遍互联网,找到如下答案: WCF Fix for SharePoint 2010 Windows Serve... 阅读全文
posted @ 2010-07-21 16:27 wengnet 阅读(593) 评论(0) 推荐(0) 编辑
摘要: [代码] 阅读全文
posted @ 2010-03-01 14:42 wengnet 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 先看代码:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xh... 阅读全文
posted @ 2009-12-04 10:27 wengnet 阅读(1462) 评论(2) 推荐(1) 编辑