SharePoint Object Names – No Spaces 

Tags: Admin, Pre SharePoint 2010, SharePoint 2010

I have always avoided using spaces in object names, even in my file names and directory names. This stems from a programmer's background and a general dislike of seeing things like http://somedomain.com/home%20page.htm. It also makes DOS commands and batch files easier.

It's similar with SharePoint. It allows Content Types and site column names to contain spaces, but when you want to use them in CAML, XML or XLS via a Data Form Web Part, a column named "Expiration Date" turns into "Expiration_x0020_Date". However, you can initially name such a field using the "camel back" format, i.e., ExpirationDate, and then rename the field to "Expiration Date". The internal field name remains ExpirationDate, but end users see it with the space. The few extra seconds it takes to rename such fields is worth it.

 
Posted by AndyGett on 9-Aug-08
0 Comments  |  Trackback Url | Bookmark this post with:        
 

Comments

Name:
URL:
Email:
Comments: