Posts Tagged ‘SharePoint’

Some tips for MOSS or WSS developer »

Avoid empty catch blocks and use error logging instead. Use the 'as' operator to cast reference types instead of a type cast. This saves you a NullReferenceException in case of an invalid cast. Use the TryParse methods to convert strings to value types instead of the Convert class. Everything placed in a 12-hive sub folder should have it's

Web Part Life Cycle Events »

There are various web part events in the life-cycle. The following would shed some light to these events and help us to choose these events correctly based on the needs OnPreRender: It is called logically called before Render event of the ASP.NET page. This is the last opportunity for us to affect the rendering behavior of the web part page.

How to : Execute Timer Jobs Programmatically »

using(SPSite site = new SPSite("http://portal")) { foreach(SPJobDefinition job in site.WebApplication.JobDefinitions) { if(job.Name == "Workflow Auto Cleanup") { job.Execute(new Guid("C9CBB265-FB94-497f-8AC0-E99CDFBC4F52")); } } } 来源: http://www.evrenayan.net/post/How-to-Execute-Timer-Jobs-Programmatically.aspx

How to query cross-site lists in DataFormWebPart? »

Please move to the original source for these articals, thanks. Part 1. Build your own data source for DataFormWebPart Part 2. Use XSLT generated from SharePoint Designer to display data Part 3. Filtering on column headers problem

MOSS开发笔记2 »

今天是接触MOSS开发的第二天, 任务的难度开始增大. 项目需要添加若干List, 用于保存数据. 其中一个List包含一个颜色类型的自定义字段. 今天的任务就是用代码实现这个自定义字段. 正式的步骤和代码参考这里, 需要注意的几点如下: 1. 代码文件的项目需要签名, 注册到GAC中 2. acsx组件文件需要保存到模板目录中 C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES 3. xml文件需要注意文件名称格式, 同样需要保存到对应的xml目录中 C:\Program Files\Common Files\M

 Page 2 of 2 « 1  2