I have a model with 5-6 properties. Rather than tediously writing a line of code to create a textbox in the view, is it possible to loop through all the properties in the model (which are public) and create a textbox in the view for each iteration?
Thanks
Yes you can use
@Html.EditorForModel()or if you want more granular control you can generate the textboxes with the help of a little reflection: