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. Commented Jun 23, 2022 at 7:53

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.