After logging in to work, I have some problems that I want. So I came up with the idea to use the current page to store and redirect to view, so if the page is mydomain.com/debate/1 then I have "/ debate / 1" stored in the clock But when I try to redirect me to give this complaint to me
The parameter dictionary contains the non-tapable type 'System.Int32' for System.Web.Mvc.ActionResult Enter an empty for parameter 'id' Is. 'Debate Details (In 32)' in 'Political Debate' Controllers Debt Controller 'An optional parameter should be a reference type, a faucet type, or should be declared as an optional parameter. Parameter Name: Parameter
However if I type manually in mydomain.com/debate/1 then it works as expected.
Is there a way to redirect the work I want?
Since I do not see any code, so I can not comment on the way you like Trying to do that (which is not working). On future posts, Please post your code This is a way you can redirect if you simply redirect the default action on the controller:
Return it Redirect Action ("index", new {id = debateDetailsID});
Although it is difficult to say what you are actually trying to do because you mention the
debate / 1 > DebateDetails that does not match (unless you have changed the default route, I do not know, there is no code).
Update
According to your comment, you have an error in MapRoute Your MapRoute should look like this:
Way. Map route ("Debate Details", "Debate / {ID}", New {Controller = "Debate", Action = "Debate Details", // This id value is unavailable / hence it is close to the controller id = UrlParameter.Optional} Not sending;
Comments
Post a Comment