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
Creating a List from Custom List Template in SharePoint 2013
Lakshmanan Sethu Sankaranarayan
Oct 15
2014
Code
2.8
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
(ClientContext ctx =
new
ClientContext(
"http://mysite/"
))
{
ListTemplateCollection ltc = ctx.Web.ListTemplates;
ctx.Load(ltc);
ctx.ExecuteQuery();
ListTemplate listTemplate=
null
;
foreach
(ListTemplate lT
in
ltc)
{
if
(lt.Name.Equals(
"My Custom List Template"
))
{
listTemplate = lT;
}
}
ListCreationInformation lc =
new
ListCreationInformation();
lc.Title =
"EmployeeList"
;
lc.TemplateType = listTemplate.ListTemplateTypeKind;
lc.Description =
"This holds employee information"
;
List newList = ctx.Web.Lists.Add(lc);
ctx.ExecuteQuery();
}
SharePoint 2013
Template in SharePoint 2013
create List in SharePoint