我有
http://localhost:4660/Grid/IndexWithAjax?ajax=this%20is%20ajax%20sample
点击
@ Html.ActionLink(“Ajax2”,“IndexWithAjax”,“Grid”,new {ajax =“这是 ajax示例“},null)
但我想更改此网址,例如
http://localhost:4660/Grid/IndexWithAjax/this%20is%20ajax%20sample
请帮助我如何做到这一点,我也在全局文件路径中做了如下所示。
routes.MapRoute(
"GridData2", // Route name
"{controller}/{action}/{ajax}", // URL with parameters
new { controller = "Grid", action = "IndexWithAjax", ajax = UrlParameter.Optional } // Parameter defaults
);