Saturday, February 5, 2011

How to define the RouteTable in VB.NET ?

[Route Table 1][1] This image shows how to define the RouteTable in C#, using the Route Class. How to define it in VB.NET?

  • I see you've asked a couple of questions about code conversion. There are free tools that help with this like:

    http://codechanger.com/

    It'll be quicker than waiting for others to help you translate. There are some language features that don't get handled well, but it works on most code.

    Also, you image link is broken, so I can't see the code to help translate.

    : This is how the code looks. Route myroute=new Route(); myroute.url="[controller]/[action]/[id]"; myroute.RouteHandle=typeof(MvcRouteHandler); myRoute.Defaults=new {action="Index", id=(string)null}; For the below line of Code, myRoute.Defaults=new {action="Index", id=(string)null}; Would it be like myroute.defaults=New With {action="Index",id=(string)null}; or myroute.defaults=New With {.action="Index",.id=(string)null}; Thanks in advance

0 comments:

Post a Comment