Creating a List programmatically using the sharepoint object model

You can create a list by picking one of the List Template Types available in the SPListTemplateType object.

Guid listId = web.Lists.Add("List Name", "Description", SPListTemplateType.GenericList);
SPList list = web.Lists[listId];

Reference:
http://msdn.microsoft.com/en-us/library/ms425818.aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splisttemplatetype.aspx

Thanks!
Avinash

calendarMarch 12, 2012 · cardInfoyen · commentsNo Comments
tagTags: , ,  · Posted in: List, MOSS, SharePoint

Leave a Reply

Spam Protection: , required

myworldmaps infoyen