3

I have a problem with mapping a hidden for remote validation.

I have this class:

[Remote("Check", "Route", AdditionalFields = "LanguageID", ErrorMessage = "Err")]
public string RouteToken { get; set; }

public string LanguageID { get; set; }

View:

@Html.Hidden("Route.LanguageID", Model.Route.LanguageID)

Gets rendered:

<input id="Route_LanguageID" name="Route.LanguageID" type="hidden" value="SV">

And it posts strange values with ".\" in name so it doesnt map to my original class:

enter image description here

What might be wrong here? No idea why it adds \ to name

4

1 回答 1

0

问题是 jquery.validate.unobtrusive.js 文件中的自定义替换

于 2013-09-06T10:25:57.377 回答