I search and read all the questions that I can find here and on Google, and I can not find the answer!
The questions in this question say:
routes.MapRoute("Admin - Change Password", "Admin/ResetPassword/{UserId}", New With {.controller = "Admin", .action = "ResetPassword", .UserId = ""})
Created by Url It Generation: / Admin / UserAdmin
which is the url.action page. I don’t know if it matters or not.
When I used the route debugger, it showed Url, I expect it to be generated as the corresponding URL that I typed in my address bar.
True Admin / ResetPassword / {UserId} controller = Admin, action = ResetPassword, userId =
The only other routes he matched were:
True {controller} / {action} / {id} controller = Home, action = Index, id =
True {* catchall} (null)
The route {controller} / {action} / {id} is the last, so it should not interfere.
Any ideas?
EDIT: :
<%Url.Action("ResetPassword", "Admin", new with {.UserId= u.userId}) %>