I have the following setup for my application:
routes.MapRoute("Default",
"{controller}/{action}/{idt}",
new { controller = "Home",
action = "Index",
idt = UrlParameter.Optional });
I am using GUIDs insted of integers for idt parameter and primary keys in my DB/Model.
I have, in the “Main” menu for my application:
@Html.ActionLink("Create invoice", "Create", "Invoices")
If I start the application and look at what path this link points to, it is a correct one: /Invoices/Create
But, since this path is used for the edit of the invoice as well, if I have a page open with a path /Invoices/Create/0eb262cc-a623-41f5-9b32-fd452691f426 and then look at the path of the “main” link, it points to /Invoices/Create/0eb262cc-a623-41f5-9b32-fd452691f426.
What is that about? How can the “fixed” link change?
Is there something I have done in code without knowing? But even if I did I don’t see why would the main link change? Where does it get the GUID in the path from?
Try this:
This should solve the length=8 problem.