Using eventhandler to change the folder's content type

来源:互联网 发布:windows故障转移集群 编辑:程序博客网 时间:2024/06/10 05:09

In Sharepoint 2010, you can not set different content type content type for different folders in document library through GUI. Luckily, you can use Event handler to make it.

 

The following code implement that if you create folder whose name contains "Audio", its content type will be changed to Audio.

 

So before doing this, please make sure that your parent document library has "Audio" content type.

 

原创粉丝点击