Welcome to MSDN Blogs Sign in | Join | Help

January 2007 - Posts

MOSS 2007 : WSS 3.0 : How do you add items into Choice Site Column type.

Here is the sample code, SPWeb web = new SPSite(" http://karthick64:4040/").OpenWeb (); SPField spField = web.Fields["MyChoice"]; SPFieldChoice choiceFields = (SPFieldChoice)spField; string[] choices = new string[3] {"x", "y", "z"}; foreach (string choice
Posted by Karthikeyan | 1 Comments
Filed under:

MOSS 2007 : WSS 3.0 : How do you add a new Site Column to a Content Type using the MOSS object model?

How do you add a new Site Column to a Content Type using the MOSS object model? Here is the sample code SPWeb web = new SPSite ( " http://localhost:4040 " ).OpenWeb(); SPContentType myCT = web.ContentTypes[ "myNewContentType" ]; myCT.FieldLinks.Add( new
Posted by Karthikeyan | 2 Comments

MOSS 2007: WSS 3.0: How to add/delete/update site columns by using SharePoint WebService

SharePoint's Webs webservice can be used to add/delete/update site columns. Unfortunatley MSDN/SDK doesnot has the sample yet. Here I provide the sample code. //webs webservice object localhost. Webs websService = new ContentTypeAndSiteColumn.localhost.
Posted by Karthikeyan | 4 Comments
Filed under:
 
Page view tracker