I created a special User Control that inherits KeyValuePair. In my ViewModel, there is a property called lookup
[UIHint("Lookup")] public KeyValuePair<string, string> lookup { get; set; }
User management
Html.TextBoxFor(m => m.Value, new { id = "Name", style = "width: 200px; background-color: #C0C0C0" }) Html.HiddenFor(m => m.Key, new { id="Guid"})
The user control has several Jquery statements that set the value of the TextBox and Hidden field.
When I do DEBUG for the controller's POST method, I don’t see the value inside the Lookup property ?!
But if I change the type of the property to a string instead of KeyValuePair and also change the type of User Control, I see the value.
I think I'm very close, but I can’t understand.
Anwar
source share