摘要: 比较正统的是用来与list item 的itemadding的event handler,代码如下:SPList currentList = properties.List; SPQuery query = new SPQuery(); query.Query = "<Where><Eq><FieldRef Name='Author'/><Value Type='Integer'><UserID Type='Integer'/></Value></Eq> 阅读全文
posted @ 2013-01-26 21:20 举重-若轻 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 碰到这个错误了,差了半天没找到彻底的解决办法,折中一点是先在vs中deploy了,然后执行以下install-spsolution的命令,再部署一下,就部署上了。PS> install-spsolution -identity suveryeventreceiverproject1.wsp -gacdeployment以下文章都只能提供些线索:http://social.technet.microsoft.com/Forums/nl-NL/sharepoint2010programming/thread/a1eab1a6-ab21-4d76-8e3f-0c5deb38ff0ehttp:/ 阅读全文
posted @ 2013-01-26 21:18 举重-若轻 阅读(11262) 评论(0) 推荐(0) 编辑
摘要: Start-SPAssignment -Global$SiteUrl = "your siteurl"$NewSystemMasterPageUrl = "/CorporateCommunications/_catalogs/masterpage/v4.master"$site = Get-SPSite $SiteUrl$topWeb = Get-SPWeb $site.Urlforeach ($web in $topWeb.Webs){ #Write-host $web.Title $web.MasterUrl $web.MasterUrl = $Ne 阅读全文
posted @ 2013-01-26 15:44 举重-若轻 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.webcontrols.asseturlselector.aspxCustom asset picker field in SharePoint 2010http://vamshikgovind.wordpress.com/2010/11/07/assetpicker/http://fahadzia.com/blog/2009/11/using-sharepoint-image-picker-to-select-images/How to: Custo 阅读全文
posted @ 2013-01-23 15:59 举重-若轻 阅读(155) 评论(0) 推荐(0) 编辑
摘要: http://www.woodwardweb.com/dotnet/generating_exce.htmlResponse.Clear(); Response.Charset = ""; // set MIME type to be Excel file. Response.ContentType = "application/vnd.ms-excel"; // add a header to response to force download (specifying filename) ... 阅读全文
posted @ 2013-01-03 12:22 举重-若轻 阅读(176) 评论(0) 推荐(0) 编辑
摘要: http://blog.karstein-consulting.com/2010/12/23/read-and-write-user-profile-properties-of-sharepoint-2010-user-profile-service-application-with-powershell/I needed to change some properties of user profiles of my SharePoint 2010 farm.Of cource I wanted to do this with PowerShell!Before you can execut 阅读全文
posted @ 2012-12-22 17:07 举重-若轻 阅读(337) 评论(0) 推荐(0) 编辑
摘要: declare@sqlvarchar(100)set@sql='selectidasa,nameasbinto##bfromtablename'print@sqlexec(@sql)select*from##bdroptable##b//一定要DROP不然又要报错Quote fromhttp://www.cnblogs.com/Fskjb/archive/2009/07/06/1517989.html 阅读全文
posted @ 2012-12-12 13:16 举重-若轻 阅读(97) 评论(0) 推荐(0) 编辑
摘要: SQL SERVER – Random Number Generator Script – SQLQueryApril 29, 2007 bypinaldaveRandom Number GeneratorThere are many methods to generate random number in SQL Server.Method 1 : Generate Random Numbers (Int) between Rang---- Create the variables for the random number generationDECLARE@RandomINT;DECLA 阅读全文
posted @ 2012-12-12 12:34 举重-若轻 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Like alot of people in the SharePoint development community I have been using a VPC to do debugging of code through SharePoint. I don't really like this because for one, running an enterprise level application plus visual studio with a laptop and 2GB of memory is very time consuming and can get 阅读全文
posted @ 2012-11-30 10:59 举重-若轻 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Read UPS:http://usingsystem.wordpress.com/2008/01/14/sharepoint-user-profiles/http://technet.microsoft.com/en-us/library/ee721054.aspxhttp://technet.microsoft.com/en-us/library/gg405402.aspxhttp://go4answers.webhost4life.com/Example/get-user-profile-record-user-78957.aspxRecreate UPShttp://www.shar. 阅读全文
posted @ 2012-11-13 19:03 举重-若轻 阅读(120) 评论(0) 推荐(0) 编辑