【问题标题】:How to define the RouteTable in VB.NET?如何在 VB.NET 中定义 RouteTable?
【发布时间】:2009-06-03 09:46:54
【问题描述】:

[路由表1][1] 此图显示了如何使用 Route 类在 C# 中定义 RouteTable。 VB.NET中如何定义?

【问题讨论】:

  • 我们看不到您的参考资料。尝试将其作为文本插入。
  • Route myroute=new Route(); myroute.url="[控制器]/[动作]/[id]"; myroute.RouteHandle=typeof(MvcRouteHandler); myRoute.Defaults=new {action="Index", id=(string)null};

标签: asp.net-mvc vb.net routetable


【解决方案1】:

我看到您问了几个关于代码转换的问题。有一些免费工具可以帮助解决这个问题:

http://codechanger.com/

比等别人帮你翻译要快。有一些语言特性没有得到很好的处理,但它适用于大多数代码。

另外,你的图片链接坏了,所以我看不到帮助翻译的代码。

【讨论】:

  • 这就是代码的样子。路线 myroute=new Route(); myroute.url="[控制器]/[动作]/[id]"; myroute.RouteHandle=typeof(MvcRouteHandler); myRoute.Defaults=new {action="Index", id=(string)null};对于下面的代码行,myRoute.Defaults=new {action="Index", id=(string)null};会不会像 myroute.defaults=New With {action="Index",id=(string)null};或 myroute.defaults=New With {.action="Index",.id=(string)null};提前致谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-06-18
  • 2016-09-06
  • 2014-09-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多