I have a painfully simple view model
public class TellAFriendViewModel
{
public string Email1 { get; set; }
public string Email2 { get; set; }
pu
You can use Reflection to loop through each property of your model...as below
Type type = Model.GetType(); // Model is the object you are binding with in your view
PropertyInfo[] properties = type.GetProperties();
foreach (var property in properties)
{
// Code to create your text box for the property
}
Hope this helps...