Month: September 2006

SharePoint: Setting value of readonly fields programmatically

No Picture

When created items in SharePoint via the object model, you can convert a readonly property of that field to be false in order to allow you to set the value of that field. This is particularly useful for…

Read More »

SharePoint 2007: Installing Features

No Picture

To install a feature in SharePoint 2007, do the following: copy the feature folder into the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES folder. Ensure that the feature manifest (feature.xml) exists within that folder. If stsadm is not in…

Read More »

Creating GUIDs

No Picture

A Globally Unique Identifier (GUID) is a 128bit number created by windows. They are normally based on ip address, mac address, time and some other various settings and so can be considered unique across different machines (not just…

Read More »

SharePoint 2007: Setting up a decent master page

No Picture

There are two layers when styling up SharePoint – the master page layer, and the page layout layer. When you create a new page, the page is build on the “page layout” aspx file. Please note that an…

Read More »

SharePoint 2003: Some example CAML queries

No Picture

In SharePoint you are not supposed to directly access the database. Instead you should access data via the object model. SharePoint has its own syntax for queries named CAML (Collaborative Application Markup Language). Example query filtering by a…

Read More »

Simulating target="_blank" with JavaScript

No Picture

Had a requirement the other day to simulate target=”_blank” (i.e. opening a webpage in a new window) by just specifying the href attribute. This is done using JavaScript as follows (note that void(0); ensures that nothing is sent…

Read More »

Quick Note: udl file

No Picture

I always forget the name of this extension, hence why I am blogging it. If you want to test a db connection, create a blank file with a udl extension. When you subsequently open this file it will…

Read More »