asp.net MVC 3 RegisterArea with multiple optional id's not working -
i trying capture multiple optional parameters in asp.net web application. when define maproute
in registerarea()
, breaking html.actionlink()
methods.
the following code works:
public overrides sub registerarea(byval context system.web.mvc.arearegistrationcontext) context.maproute( _ "register_default", _ "register/{controller}/{action}/{id1}", _ new {.controller = "home", .action = "index", .id1 = urlparameter.optional} _ ) end sub
but when modify url include multiple optional parameters (below), causing of html.actionlink()
methods create anchor tags empty hrefs. can tell me causing happen?
public overrides sub registerarea(byval context system.web.mvc.arearegistrationcontext) context.maproute( _ "register_default", _ "register/{controller}/{action}/{id1}/{id2}/{id3}/{id4}", _ new {.controller = "home", .action = "index", .id1 = urlparameter.optional, .id2 = urlparameter.optional, .id3 = urlparameter.optional, .id4 = urlparameter.optional} _ ) end sub
it's bug in mvc3/system.web.routing:
Comments
Post a Comment