문제

I want to create a site with a title provided from a user and use the title as the site url. However I want to remove spaces and diacritics.

I replace spaces with a hyphen, and I run RemoveDiacritics as described here.

Is there a suitable method in Sharepoint API (like SPUtility or so) to achieve this goal.

도움이 되었습니까?

해결책

Here's an article from Microsoft Support on invalid characters in Sites:

http://support.microsoft.com/default.aspx?scid=kb;en-us;905231

I'm not aware of anything in the SharePoint API that would handle this for you. You can obviously take what Microsoft puts out there in the above article and write some code and/or some regular expressions to enforce those rules. This is an article I had referenced in the past on file names...and while it's not 100% identical to the rules on site titles it's a good place to start:

http://simplyaprogrammer.com/2008/05/importing-files-into-sharepoint.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top