{"action":"created","issue":{"url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/10","labels_url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/10/comments","events_url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/10/events","html_url":"https://github.com/AtaS/lowercase-dashed-route/issues/10","id":43765683,"number":10,"title":"Two optional parameters","user":{"login":"kamalraturi","id":5516410,"avatar_url":"https://avatars.githubusercontent.com/u/5516410?v=3","gravatar_id":"","url":"https://api.github.com/users/kamalraturi","html_url":"https://github.com/kamalraturi","followers_url":"https://api.github.com/users/kamalraturi/followers","following_url":"https://api.github.com/users/kamalraturi/following{/other_user}","gists_url":"https://api.github.com/users/kamalraturi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamalraturi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamalraturi/subscriptions","organizations_url":"https://api.github.com/users/kamalraturi/orgs","repos_url":"https://api.github.com/users/kamalraturi/repos","events_url":"https://api.github.com/users/kamalraturi/events{/privacy}","received_events_url":"https://api.github.com/users/kamalraturi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-09-24T13:41:08Z","updated_at":"2015-06-04T14:57:42Z","closed_at":"2015-06-04T14:57:42Z","body":"How to code for two optional parameters by default.\r\n\r\nI did this:\r\n\r\n routes.Add(new LowercaseDashedRoute(\"{controller}/{action}/{catg}/{id}\",\r\n      new RouteValueDictionary(\r\n      new { controller = \"Accueil\", action = \"Index\", catg = UrlParameter.Optional, id = UrlParameter.Optional }),\r\n      new DashedRouteHandler()\r\n             )\r\n             );\r\n\r\nbut its not working. It gives url like this:\r\nhttp://localhost:53197/logiciel/exess/gestion-de-produits-chimiques?catg=fds\r\n\r\nIt should be like this:\r\nhttp://localhost:53197/logiciel/exess/fds/gestion-de-produits-chimiques\r\n\r\nIf used general code(which is commented for LowercaseDashedRoute purpose) then it works fine:\r\n//routes.MapRoute(\r\n            //    name: \"Product\",\r\n            //    url: \"{controller}/{action}/{catg}/{id}\",\r\n            //    defaults: new { controller = \"Accueil\", action = \"Index\", catg = UrlParameter.Optional, id =      UrlParameter.Optional }\r\n            //);\r\n\r\nWhat am I missing while using LowercaseDashedRoute for two defaults parmeters?"},"comment":{"url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/comments/108924482","html_url":"https://github.com/AtaS/lowercase-dashed-route/issues/10#issuecomment-108924482","issue_url":"https://api.github.com/repos/AtaS/lowercase-dashed-route/issues/10","id":108924482,"user":{"login":"kamalraturi","id":5516410,"avatar_url":"https://avatars.githubusercontent.com/u/5516410?v=3","gravatar_id":"","url":"https://api.github.com/users/kamalraturi","html_url":"https://github.com/kamalraturi","followers_url":"https://api.github.com/users/kamalraturi/followers","following_url":"https://api.github.com/users/kamalraturi/following{/other_user}","gists_url":"https://api.github.com/users/kamalraturi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamalraturi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamalraturi/subscriptions","organizations_url":"https://api.github.com/users/kamalraturi/orgs","repos_url":"https://api.github.com/users/kamalraturi/repos","events_url":"https://api.github.com/users/kamalraturi/events{/privacy}","received_events_url":"https://api.github.com/users/kamalraturi/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T14:57:42Z","updated_at":"2015-06-04T14:57:42Z","body":"Thanks. It works!"}}