TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
SharePoint : Programmatically enabling the content approval for library
Prasham Sabadra
Feb 23
2015
Code
1.4
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
//Enabling the content approval for library
try
{
string
libraryName =
"LibraryName"
;
SPList list = web.Lists[libraryName];
if
(list !=
null
)
{
list.EnableModeration =
true
;
list.Update();
}
}
catch
(Exception ex)
{
//Handle the exception
}
enabling content approval
Programmatically enabling the content approval