ASP.NET-MVC – ASP.NET MVC errors generated by URL.Action!

I searched and read all the questions I found here and Google, and I can’t seem to find the answer!

Rout’s problem is like this:

routes.MapRoute("Admin-Change Password", "Admin/ResetPassword/{UserId} ", New With {.controller = "Admin", .action = "ResetPassword", .UserId = ""})

The Url it generates is:
/Admin/UserAdmin

This is the page where url.action is located. I don’t know if this is important.

When I use the routing debugger, it shows the Url I want it to generate the URL I entered in the address bar Match.

True Admin / ResetPassword / {UserId} controller = Admin,action = ResetPassword,userId =

The only other route it matches is:

True {controller} / {action} / {id} controller = Home,action = Index,id =

True{* catchall}(null)

{controller} / {action} The /{id} route is the last route, so it shouldn’t interfere.

Any ideas?

Edit: Helper’s code:

<%Url.Action("ResetPassword", "Admin", new with {.UserId= u. userId}) %>

Do not use Action / ActionLink to generate URIs for named routes. Please use RouteLink instead /RouteUrl. It is faster and it will never find the route you want. Full explanation here.

I searched and read all the questions I found here and Google, and I seem to Can’t find the answer!

Rout’s problem is like this:

routes.MapRoute("Admin-Change Password", "Admin/ResetPassword/{UserId} ", New With {.controller = "Admin", .action = "ResetPassword", .UserId = ""})

The Url it generates is:
/Admin/UserAdmin

This is the page where url.action is located. I don’t know if this is important.

When I use the routing debugger, it shows the Url I want it to generate the URL I entered in the address bar Match.

True Admin / ResetPassword / {UserId} controller = Admin,action = ResetPassword,userId =

The only other route it matches is:

True {controller} / {action} / {id} controller = Home,action = Index,id =

True{* catchall}(null)

{controller} / {action} The /{id} route is the last route, so it shouldn’t interfere.

Any ideas?

Edit: Helper’s code:

<%Url.Action("ResetPassword", "Admin", new with {.UserId= u. userId}) %>

Don’t use Action/ActionLink to generate URIs for named routes. Please use RouteLink/RouteUrl instead. It is faster and it will never be found The route you want. Full explanation here.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2116 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.