I am having problems with Html.ActionLink when I have a route that takes one parameter. I have the following routers in global.asx:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"materias",
"{controller}/{action}/{id},{titulo_materia}.html",
new { controller = "materias", action = "Index", id = "", titulo_materia = "" }
);
When I use ActionLink passing two parameters, everything works ok. But when I try to create a link using the first route I end up with something like:
http://meusite.com/controller-name/%5Bparameter%5D,.html
EDIT:
Here is the action link that i`m having problems:
<span class="editar"><%=Html.ActionLink("Editar", "Edit", "Users", new { id = this.Model.login }, null)%></span>
This link is on another page that is used to manage user data.