asp.net mvc - Parameter ok in RouteData but passed as null in controller -
I am a few weeks in MVC, and every day, pops up something new that kills me quite oddly . Therefore, I try to find answers to the problems I am facing. Nothing less for the current issue, I can not find a basic answer anywhere on StackHowflow or even on Google ...
I have a problem that I have with the Parameters Controller HTML Using Render Action Method For some reason, the parameter ends correctly in the root directory, but the "function parameter" is zero. I think what it needs to do with my routing maps, so I want to post them here for some more input.
My rootmap (among others, but I know my current action is using this route): ("default", "{controller} / {action} / {id}" , New {controller = "home", action = "index", id = ""
}, blank, new [] {"web. Controller"});
My Controller Action:
Public Operations General ManagementDirebetter (Intestinal ID) {// Dostuff}
Render Action Call:
& lt;% HTML renderer action ("General Management Dealit", "Person", New {id = 4}); & Gt%;
Where surely "4" is currently a difficult value, and it will become an object ID from the forward option loop present to me.
Now, what is the result of it, is that the "int id" in the controller is zero, although when the root account is "QuickWatching", then surely there is an important value pair "id, 4" in it. ..
OK, to just clarify, on this issue apparently it was that the controller We were cashed in the given structure (separate god team structure). Therefore, when we dug into the framework, and ensured that the containers were not cached anymore, passing the parameters used to act as a magic, thanks a lot for the answer, but this issue was within our own company seems to be!
Comments
Post a Comment