Dec 2, 2008

How to create site column

Site column is a reusable elements to build a content type or define a list. For example, if you have lots of lists which is using zip code, instead of redefining the zip code in all the lists, you can create a zip code site column so that you can use it across all the lists. Here site column and field type means the same thing, it is like int or string in .net. But it also can have some logic or UI associate with it.There are three ways to build a site column or field types.

First you can use IE to do that manually. Secondly, you can use feature to deploy a field definition authorized with CAML, after activate to a site, the site can pick up the site column. Thirdly, you can build a custom field type.

fields definition authorized with CAML



  
    
      High Tech
      Legal
      Medical
    
    High Tech
  

  
  


A custom field type represents a new data type for columns. Custom field types are appealing to .NET developers because they are written in managed code and compiled into .NET assembly DLLs that must be installed in the Global Assembly Cache (GAC). Along with managed code to perform initialization and validation, a custom field type is also defined in terms of one or more ASP.NET server-side controls that give you extra control over rendering and enable you to leverage techniques that are popular in standard ASP.NET development.