I want to be able to dynamically create an editor using editor templates in MVC3 (Razor).
On the model side, I want to be able to have a class that we provide all the data and which editors and it will call back in when values are edited.
Here is an example server side interface:
public interface IEditorSource
{
string[] ValueNames { get; }
object this[string name] { get; set; }
object GetValue(string name);
void SetValue(string name, object value);
string GetEditorTemplateForValue(string name);
}
This project is to implement this class editing a structure that includes these values.
name, string
description, long string
birthdate, date
birthdatewithtime, datetime
likesIceCream, checkbox
likesDonuts, drop down with yes/no (bool type).