Pregunta

Tengo el siguiente ActionLink

Html.ActionLink("Home", "Index", "Home", New With {.class = "tab"})

Pero crea el siguiente enlace en la barra de direcciones http: // localhost: 1028 /? Length = 4 en lugar de lo que espero que sea como http: // localhost: 1028 / Home .

¿He hecho algo mal para causar esto?

¿Fue útil?

Solución

Estás utilizando la sobrecarga incorrecta de ActionLink. Prueba:

Html.ActionLink("Home", "Index", "Home", Nothing, New With {.class = "tab"})

... esperando tener mi sintaxis VB correcta ...

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top