Wednesday, 11 September 2013

MVC my url is creating "?Length=4"

MVC my url is creating "?Length=4"

I am creating an MVC4 application. I have a small issue. My code is
<li id="tabHeader_2">@Html.ActionLink("Contract", "Contract", "Home", new
{ id = "lnk_contract" })</li>
I am getting url
http://localhost:2355/Home/Contract?Length=4
I want my url as
http://localhost:2355/Home/Contract
my ruoting is
routes.MapRoute( name: "Default", url: "{controller}/{action}", defaults:
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
If you have answer please help me ...

No comments:

Post a Comment