This might be a stupid question but I want to add a – into a controller name e.g. feature-request
How do I do this? I have tried creating one with a view however it can’t be found.
Can anyone point me in the right direction?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using the standard conventions in the MVC framework, you can’t. Why? Because C# (actually .NET itself) doesn’t support
-in type names.I suspect you want this to allow your users to go to http://yoursite.com/feature-request/add or something – in that case, just add a route that sends them to the correct place.
Be sure to add the routes in the correct order – the default route matches anything, so this route has to be added before the default route.