I have created a special User Control which inherits KeyValuePair. Inside my ViewModel, there is a property called lookup
[UIHint("Lookup")]
public KeyValuePair<string, string> lookup { get; set; }
User Control is
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 some Jquery statements which set the value of the TextBox and the Hidden field.
When I do a DEBUG to the POST method of the Controller, I see no value inside the Lookup property?!
But If I changed the type of the property to string instead of KeyValuePair and also change the type of the User Control, I see a value.
I think I'm very close but I can't figure it out.