I have seen in RC 2 release notes says
“The new UrlParameter type allows default values in routes to be removed after URL routing runs.”
But I still get the route values in the path.
Here what i get:
<div id="PartialView">
<%Html.RenderAction("Partial"); %>
</div>
<% using (Ajax.BeginForm("Partial", new { name = "test" }, new AjaxOptions() { UpdateTargetId = "PartialView" }))
{ %>
<button type="submit">
Submit</button>
<%} %>
In Partial Page:
<% using (Ajax.BeginForm("Partial", new AjaxOptions() { UpdateTargetId = "PartialView" }))
{ %>
<%=Html.TextBox("test") %>
<%} %>
Output of the Partial View Ajax URL is:
/Home/Partial?name=test
Where the Route Values also included in the Ajax Path.
Is this default behavior or defect…?
Thanks,
Santhosh
By default it will append the RouteValues to the URL.
To avoid the RouteValue use Url.GenerateURL(“action”,….)
Where the RouteValue parameter should new new RouteDictionary()..
And this tooo not working as the RouteValue parameter will just merge with the existing routeData.