Reputation: 2453
The answere is here, and my original question is below.....
Changing the document workspace is this easy:
using .../web_reference/dws.asmx
using (Dws DWS = new Dws())
{
DWS.Credentials = CredentialCache.DefaultCredentials;
DWS.Url = "http://sharepointsite/" + Domain + "//_vti_bin//dws.asmx";
DWS.RenameDws("New Title goes here");
}
While this may be possible using the Webs.asmx, I couldn't figure it out.
<======ORIGINAL QUESTION========>
I've created a new document workspace in SharePoint with the following:
using (sp_Meetings.Meetings adm = new sp_Meetings.Meetings())
{
adm.Credentials = System.Net.CredentialCache.DefaultCredentials;
adm.Url = "http://sharepoint/_vti_bin/Meetings.asmx";
try
{
XmlNode CreatedSite = adm.CreateWorkspace(Domain, "Supplier.stp", 1033, new sp_Meetings.TimeZoneInf());
}
catch (Exception e)
{
MessageBox.Show("EXCEPTION: " + e.Message);
}
}
The site is created properly, but the URL and the title are always the same.
url: http://sharepointsite.com/sites/*domain*
page title: *domain*
Obviously this doesn't work because I want my Title to contain spaces, and my URL to not contain spaces. Since they both pull from the "domain" variable, i need a more granular solution.Is there any way to re-title a sharepoint page made programatically?
I tried this:
adm.SetWorkSpaceTitle("Nice Title");
but it throws SOAP errors.
Upvotes: 2
Views: 260
Reputation: 419
You cannot do it before the site is created. Once the site is created, you need to get the SPWeb object and use the object model to update the title. it should then work without any issues...
Upvotes: 1