I've always been a very strong advocate of NOT using Special characters when naming anything in SharePoint (Sites, Libraries, Content Types, Site Columns, ect..) Well the other day I broke that rule and tried naming Library with a dash - in it since it has worked in the past for Content Types and Site columns.... I know I know not a good excuse.
So in my development SharePoint VM I created a library call Test-Test_123 inside the following site http://apdev:1212/ It created the library just fine and the name reflected Test-Test_123 and I didn't think anything of it until I started to reference the library in code and I kept getting an error that it could not be found.
Turns out all special characters except underscores _ will be stripped out of the underling name. So the URL looks like http://APDev:1212/TestTest_123
I don't know why this only seems to happen in Library names but it does. I guess shame on me for breaking my own rule...
No comments:
Post a Comment