Development

Issues in WSS V2

Responses to items in an Issue list (SPListIssue) are new version in WSS V3. WSS V2 lacks the ability to use versions for lists. So what did Microsoft do that an Issue list behaves like it is using versions? In WSS V2 items in a single “thread” all have different ItemIDs. To group them together, all have the same IssueID. This is the ItemID from the original item. A single issue in WSS V2 could look like this:

Custom Field – Upload Files and Images

If you know my WikiWebpart or DiscussionListUploader, you know that there are some occasions where you want to upload a file, and place a link to it to another field. The above solutions are only for the certain list type. My new custom field can be used on every list or library! Just add the field to one of your lists/libraries: It will automatically try to find local libraries for documents and images to store the uploaded files and images.

How to use the SharePoint Web Controls – Update

My post How to use the SharePoint Web Controls has been updated. It now shows how to use a generic control for each SPField, instead of picking the corresponding SharePoint Web Control. 1: BaseFieldControl webControl = field.FieldRenderingControl; <span class=lnum> 2: </span>webControl.ListId = list.ID; 3: webControl.ItemId = item.ID; <span class=lnum> 4: </span>webControl.FieldName = field.Title; 5: webControl.ID = GetControlID(field); <span class=lnum> 6: </span>webControl.ControlMode = mode; Thanks for all the great comments and ideas!

SharePoint Dispose Checker Tool

As I posted earlier, MS was working on a tool which will analyze your code if you are coding against SharePoint. Here is a short description: It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code. Further investigation is advised if you continue to experience issues. SPDisposeCheck.exe takes the path to a managed .

SharePoint Web Controls to access remote content

In my post How to use the SharePoint Web Controls I talked about using the SharePoint Web Controls to show and edit data in SharePoint lists. Today I want to post a sample how to work on a list, which is in another web. The remote list will be the “User Information List” which exists on every rootWeb. 1: // connect to the rootweb, to read the users list

Coding with SharePoint? Things you should not do

Often there are multiple ways to get what you want. E.g. if you want to get a listitem, you could user list.GetItemById() or list.Items[x]. sowmyancs has posted an excellent article about performance for certain tasks –> Best Practices: SharePoint Object Model for Performance TuningTechnorati Tags: SharePoint,Performance,Object Model

Visual Studio 2008 extensions for SharePoint v1.3

As you can read on the Microsoft SharePoint Team Blog, a new version of the Visual Studio extensions have been released. This version is Community Technology Preview. And wow… yes… finally… x64 support! The download is available here. The final release of VSeWSS 1.3 is planned for the North American Spring of 2009.Technorati Tags: SharePoint,VSeWSS

Modify blog post categories

If you plan to use the CKS:EBE (Enhanced Blog Edition), you might want to update the categories of your posts, because the EBE supports multiple categories for a post. I’ve created a Windows Forms Application, which will help you with this task. Features: Update categories for blog posts Select multiple categories Remove categories from blog post Add categories to the categories list Modify the blog posts, without changing the modified date Requirements:

Is the current user anonymous?

If you want to find out if the current visitor is anonymous or logged on, you can use the context to get that information.bool anonymous = Context.User.Identity.IsAuthenticated == false; If you just go for SPWeb.Current.Web.CurrentUser, you will get logged on automatically to retrieve the current user.Technorati Tags: SharePoint,Context

Upload documents/pictures to a discussion lists

You might already know my Wiki Webpart, which allows you to upload pictures and documents to a Wiki while editing it. What is it? With this Solution you can upload images and documents from the new/edit form into existing picture/document libraries. After the file has been uploaded, a link will be inserted into the Body. This is either a or a tag, depending on the uploaded file. How does it work?