This log shows how to use web sevice to create a subsite. Now that you can create a site, you must be able to delete it. This articleArticleThis section describes how to delete a site during client programming.
Meetings. CREATEWORKSPACE provides a method to create a sub-site. The meetings. deleteworkspace method also provides a method to delete the site, but only the Meeting Workspace site can be deleted. If you try to delete a non-Meeting Workspace site, an exception will be thrown, which is clearly written in the SDK, and I will not go into details.
There is only one way to do this. Use SharePoint RPC, where the remove service method can do this. The following is an example:
Here, SERVICE_NAME is the relative path relative to the root site. For example, your site is Region.
var rpcstring = 'method = remove + Service & SERVICE_NAME = '+ web_server_relative_url +'/'+ sitename; $. ajax ({URL: web_server_relative_url + '/_ vti_bin/_ vti_adm/admin. dll ', type: 'post', beforesend: function (xhr) {xhr. setRequestHeader ('x-Vermeer-content-type', 'application/X-WWW-form-urlencoded');}, data: rpcstring, async: True, contenttype: 'application/X-WWW-form-urlencoded ', complete: function (data, textstatus) {If (textstatus = 'success' & $ (data. responsetext ). length = 2) {// sucessfully deleted web. // do your job here} else {// failed to delete Web }});