I have the following route:
context.MapRoute ( "PersonArea_tripleInt", "PersonArea/{controller}/{action}/{int1}/{int2}/{int3}", new { controller = "Person", action = "Index" }, new { int1 = new IntConstraint(), int2 = new IntConstraint(), int3 = new IntConstraint() } );
I use the following in my controller:
RoleListUrl = Url.Action("RoleList", "Person", new { Area = "PersonArea" }),
To create this url: "/ PersonArea / Person / RoleList"
In my opinion, I have drop-down lists that will populate the values โโof int1, int2 and int3. I use JavaScript in the client to populate the rest of the url:
"/ PersonArea / Person / RoleList / 12/43/76"
This works fine for the first time, but when the page reloads, the old values โโ(12, 43, 76) are reused when creating the base url in my controller. Thus, when the user interacts with the drop-down lists, the following URL is created on the client:
"/ PersonArea / Man / RoleList / 12/43/76/88/154/78"
How to force Url.Action to ignore old values โโ(12, 43, 76) on subsequent messages on the server so that the client can create the correct URL? I resort to hard coding the base url ("/ PersonArea / Person / RoleList /") in the controller.
I just want the controller to produce "/ PersonArea / Person / RoleList" every time and let the client fill in the rest of the parameters.
What am I missing? Thanks.