ASP.NET MVC routing issue: How to allow "\" in id's
- by Bipul
I am using following route map
routes.MapRoute(
"RenderAssociatedForm",
"DoAction/{nodeLevelId}/{nodeSystemId}",
new
{
controller = "FrontEnd",
action = "RenderAssociatedForm",
});
Now nodeLevelId can be anything like zs\bbal. As we know that we should escape '\', so we are using 'zs%5cbbal'. But still the following url is not mapping to this route.
//localhost/DoAction/zs%5cbbal/5
When I try simple Id without the escape character, it maps properly. Can anybody tell me where I am going wrong?