0

I'm building a SharePoint Farm Solution and want to know if it is possible to change a Web's URL from Code.

Imagine I have a Page (http://page), that page has a list (http://page/Lists/projects).

Every Time I add a new Item in that List, a new Web will be created (http://page/)

Every Time I delete an Item the corresponding Web will be deleted.

Now I want the user to be able to Update that Item, but I don't know if changing a Web's URL is possible. I currently have an SPWeb Object at Hand and can Display the corresponding Web's properties (url, name, etc.), but the property "Url" can't be set.

1 Answer 1

0

It should be possible to change url using the SPWeb.ServerRelativeUrl property.

https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ms476956(v=office.15)

1
  • Thanks, this worked.
    – Saik
    Jun 23, 2022 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.