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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sreenu kolusu
NA
38
181.4k
Sharepoint 2010 Client object Model Using in Windows application
Aug 9 2012 2:42 PM
Client object Model Using To Create Site
ClientContext clientContext = new ClientContext("http://demoshare:6969/YourSite/");
System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("Administrator", "@Nivista123", "sp.com");
clientContext.Credentials = credentials;
WebCreationInformation wci = new WebCreationInformation();
wci.Url = "YourSite1"; // Relative URL
wci.Title = "YourSite1";
wci.Description = "Your nice description.";
wci.UseSamePermissionsAsParentSite = true;
wci.WebTemplate = "STS#0";
wci.Language = 1033; //LCID
Web w = clientContext.Site.RootWeb.Webs.Add(wci);
clientContext.ExecuteQuery();
MessageBox.Show("site created");
Client object Model Using To Create SubSite
ClientContext clientContext = new ClientContext("http://demoshare:6969/YourSite/");
System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("Administrator", "@Nivista123", "sp.com");
clientContext.Credentials = credentials;
WebCreationInformation wci = new WebCreationInformation();
wci.Url = "YourSite1"; // Relative URL
wci.Title = "YourSite1";
wci.Description = "Your nice description.";
wci.UseSamePermissionsAsParentSite = true;
wci.WebTemplate = "STS#0";
wci.Language = 1033; //LCID
// Web w = clientContext.Site.RootWeb.Webs.Add(wci);
Web w = clientContext.Web.Webs.Add(wci);
clientContext.ExecuteQuery();
MessageBox.Show("subsite created");
Reply
Answers (
1
)
How to change the authentication classic mode to Claim based authentication
managed Client object model in sharepoint2010