<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Creating Custom Routes</title><link>http://asp.net</link><pubDate>Sun, 18 Mar 2012 23:07:01 GMT</pubDate><generator>umbraco</generator><description>Comments for Creating Custom Routes</description><language>en</language><atom:link href="http://asp.net/rss/comments/27556" rel="self" type="application/rss+xml" /><item><title>Comment Posted by jijo.jijo</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Fri, 28 May 2010 02:48:49 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000008939</guid><description><![CDATA[ <p>Nice article... Thanks. I have a question, I want to create a route like {collection}/{controller}/{action}. For example, www.mydomain.com/de/MyController. The problem here is value of  {collection} will not be there in all requests ie, I may get a request like www.mydomain.com/MyController, and the value of {collection} is not constant vale ie, the request like www.mydomain.com/jp/Mycontroller.</p><p></p><p>Please help</p><p></p><p>Thanks</p><p>Jijo</p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jijo.jijo.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by pollirrata</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Wed, 07 Jul 2010 11:51:41 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009355</guid><description><![CDATA[ <p>It wouldn&#39;t be better to have the collection as a parameter? like {controller}/{action}/{collection}? I don&#39;t know what&#39;s your idea, so maybe it&#39;s a silly suggestion...</p><p></p><p>Anyway, Have you tried redirecting from your default route (www.mydomain.com/ ==&gt; mydomain.com/jp/Mycontroller?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/pollirrata.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by vhornk</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Fri, 30 Jul 2010 01:51:58 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-000000009680</guid><description><![CDATA[ <p>In my ajax projects I like routing customization functionality to pass Controller/Action inside JSON object</p><p><a rel="nofollow" href="http://vitana-group.com/article/microsoft-.net/route-handling" target="_blank">vitana</a></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/vhornk.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by pradip.bobhate</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Wed, 01 Dec 2010 03:53:20 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000011091</guid><description><![CDATA[ <p>Nice articale but tell me following code is not at all invoking any view so which view it will use</p><p></p><p>public string Entry(DateTime entryDate)</p><p>        {</p><p>            return &quot;You requested the entry from &quot; + entryDate.ToString();</p><p>        }</p><p></p><p></p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/pradip.bobhate.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jamesstill</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Thu, 03 Mar 2011 13:23:51 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000012331</guid><description><![CDATA[ <p>There&#39;s a typo above. Instead of in global.asax &quot;Archive/{entryDate}&quot; you want to have &quot;Archive/{action}/{entryDate}&quot; otherwise an ArgumentException is thrown.</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/jamesstill.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by davidals</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Thu, 09 Jun 2011 10:01:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000013466</guid><description><![CDATA[ <p>This code is only accepting mm/dd/yyyy date format, what if I wanted to accept dd/mm/yyyy ?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/davidals.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by thundar viking</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Sun, 28 Aug 2011 12:16:52 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014066</guid><description><![CDATA[ <p>@davidals: I would suggest changing entryDate into a string and then parse it in the controller action so that you can pass the datetime as dd/mm/yyyy . Obviously, you need to failsafe the parsing of the date. </p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/thundar%20viking.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by divakarganta</title><link>http://asp.net/mvc/tutorials/controllers-and-routing/creating-custom-routes-cs</link><pubDate>Sun, 18 Mar 2012 23:07:01 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015147</guid><description><![CDATA[ <p>Hi,</p><p></p><p>See, the default code as below in RegisterRoutes method of Global.asax page</p><p>            routes.MapRoute(</p><p>                &quot;Default&quot;, // Route name</p><p>                &quot;{controller}/{action}/{id}&quot;, // URL with parameters</p><p>                new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional } // Parameter defaults</p><p>            );</p><p>Even I can able to access the http://localhost:52341/Account/LogOn, </p><p>so what is the use of Routing in this case?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/divakarganta.jpg?forceidenticon=false&amp;dt=635045045400000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>