Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Trying to create a folder in Sharepoint

  Asked By: Enrique    Date: Feb 01    Category: Sharepoint    Views: 1257

My developer is attempting for the first time to create a folder
programmatically by using the dws web service. Button 1 is where he is
creating the folder and button 2 is deleting the folder. If he runs
button 1 twice, the folder is created the first time and the second time
it says that the folder already exists. This is an expected result.
Looking at SharePoint the developer does not know where this folder is
being created. The folder is trying to be created is TestDocs in the
Document Center on a Publishing Site.



// Creating folder

private void button1_Click(object sender, EventArgs e)

{

DWS.Dws svr = new TestSPService.DWS.Dws();

svr.Credentials =
System.Net.CredentialCache.DefaultCredentials;


MessageBox.Show(svr.CreateFolder(@"/Docs/Documents/TestDocs"));

}



// Deleting Folder

private void button2_Click(object sender, EventArgs e)

{

DWS.Dws svr = new TestSPService.DWS.Dws();

svr.Credentials =
System.Net.CredentialCache.DefaultCredentials;


MessageBox.Show(svr.DeleteFolder(@"/Docs/Documents/TestDocs"));

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Trying to create a folder in Sharepoint Or get search suggestion and latest updates.




Tagged: