I have a question about global.asax that I don't really understand. My scenario is that I have this route defined :
routes.MapRoute(
"Suspensions",
"Suspension/{action}/{id}/{prev}",
new { controller = "Suspension", action = "Index", id = "", prev = "" }
);
The thing is that when I call it like:
<%= Html.ActionLink("Edit", "EditTemporal", new { id = item.TCtsRecID,
prev = previousPage})%>
I get the following route generated:
http://localhost:1537/Suspension/EditTemporal/3941?prev=1
What I really expected it to do would be http://localhost:1537/Suspension/EditTemporal/3941/1
, because I'm using the split method to get the options passed and show or hide parts of the page depending on the last parameter. Could you tell me what am I doing wrong for not getting it as I want it? I know there are some ways round this, but I would like this specific solution, as it is what I开发者_C百科'm suppossed to do.
Thank you all! VIctor
It sounds like it could be possibly hitting the Default route. Have you checked that your Suspensions route is defined before (above) the default route?
精彩评论