开发者

SharePoint2010 creating/updating a site programmatically

开发者 https://www.devze.com 2023-02-16 12:47 出处:网络
I have a share point site that I wish to updat开发者_开发百科e programmatically. I.E I want to add a column in a list. I want to capture this in code so that I can run it against dev, test and live. W

I have a share point site that I wish to updat开发者_开发百科e programmatically. I.E I want to add a column in a list. I want to capture this in code so that I can run it against dev, test and live. What is the best way to do this.


Using Visual Studio 2010, create a Feature and add a Feature Activated event handler.

here's a tutorial on MSDN on how to add a field to a list.

http://msdn.microsoft.com/en-us/library/aa540133.aspx


I hope the best way is to use powershell script and execute the script on any environment.

Another way is you can create wsp package with ListInstance xml.

I prefer the last choice for writing code in feature activation for creating list. You can refer to my blog for Creating Custom List with powershell.

0

精彩评论

暂无评论...
验证码 换一张
取 消