【发布时间】:2011-09-08 14:40:37
【问题描述】:
这是我的路线(工作)
routes.MapRoute("ClientIndexAndSubstringChar", _
"{controller}/{action}/{FirstChar}", _
New With {.char = "[a-zA-Z0-9]"})
这是在我的控制器中(工作)
Function Index(Optional ByVal KlantenSet As List(Of Domain.Slave.Klant) = Nothing, Optional FirstChar As Char = Nothing, Optional format As String = "html") As ActionResult
//Some Code
End Function
这是我的视图(链接不正确)
@If ViewBag.ClientsLetters IsNot Nothing Then
For Each ClientLetter As String In ViewBag.ClientsLetters
@<div class="ClientsLetter">
@Html.ActionLink(ClientLetter, "Index", "Client", New With {.FirstChar = ClientLetter})
</div>
Next
End If
ActionLink 错误....
我应该怎么做才能解决它? 我的链接链接到: http://localhost:52254/Client/Index.html?Length=6 代替 http://localhost:52254/Client/Index/A
【问题讨论】:
标签: asp.net-mvc asp.net-mvc-3 asp.net-mvc-routing