asp.net mvc - MVC ActionMethod not finding passed in Value -


I have a verb action, something on the lines of this:

  [ AcceptVerbs (HttpVerbs. Post)] Public Action Methashan (Travel Journey) (If Request (ISAJK REAST)) // Save Value Return Jason (New {Travel UDI = Travel. Jardine ID})}}  

The travel object that I pass is from my LINQ2 SQL Datamodal. I use the JQuery.Post function above my JavaScript I call ActionMethod, such as:

  var travel data = {CustomerID: $ ('# CustomerID'). Val (), JourneyID: $ ('#JourneyID'). Val ( ), Estimated travel times: $ ('# estimated traveltime'). Val (), root name: $ ('# routeName'). Val (), .....}; $ .post ('/ travel / create ', Travel data, function (JasonResult) {// deal with result},' Jason ');  

The problem I am experiencing is that Journey.RouteName in Action Management Always returning to zero, but JSON passes back a value Audience is, I think it

  alert (JSON.stringify (journeyData));  

And as a result, the root name is a value in the JSON object, e.g. 'Go to work' Any ideas why it is not being set up in ActionMethod? All the other values ​​that I pass are being corrected.

Just a try and error suggestion:

First of all I will try " RouteName "is to change something differently, because" RouteName "is also the property of some MVC-redirect methods.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -