Click here to Skip to main content
14,970,330 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
When i tried to add new page in my project its giving me below message , and not allowing to add the page.

Cannot contain any of the following characters: / ? : & \ * " < > | # %
Cannot contain unicode characters
Cannot contain surrogate characters
Cannot be reserved names including 'CON', 'AUX', 'PRN', 'COM1' or 'LPT2'
Cannot be '.' or '..'

please enter valid name

and it connected with VSS(visual source safe)

What I have tried:

I tried below options
1. copied already exists page from the same project and pasted it and then tried to rename it
2.created new page using already exist page outside the visual studio and tried to add existing option
Updated 27-Mar-17 0:29am
Marco Bertschi 27-Mar-17 5:42am
Just use plain ASCII characters. Then try again. If in doubt, your page has a different name that you intended, but that is nothing your users will care about, you can display whatevertheheck you want *on* the page.

1 solution

Bear in mind that the page name is a class name in C#: so if you call your page anything which isn't legal as a C# variable, then VS will refuse it. The most common fault is to try using a space or a dot: these terminate variable names so are illegal in the class file name. Basically, stick to A-Z, a-z, and 0-9 and you'll be fine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900