Assume
string value = ViewModelObject.SomeList[n].AnotherList[m].SomeProperty.ToString() //value is '5'
I need to turn this:
Expression<Func<ViewModelObjectType, object>> exp = x => x.SomeList[n].AnotherList[m].SomeProperty
into
<input type='hidden' name='SomeList[n].AnotherList[m].SomeProperty' value='5'/>
where n and m are integers.
I'm betting someone's solved this before. I want to bind my javascript control to my page viewmodel in a type safe manner. I'm playing around with the expression classes now and I can extract the property as a string but the rest of it I haven't figured out yet.
Thanks!