Reputation: 29
I'm fairly new to MVC and am looking for some advice in relation to creating Models for online forms. I'm trying to convert a paper based form into an online version.
Link to form: Extract of form
So I'm looking for some advice on setting up the model:
Any advice would be greatly appreciated :)
Upvotes: 0
Views: 56
Reputation: 2504
The best place for you to start would be on MSDN, where the naming conventions are clearly stated to make it easy for everyone who works on it and that follows best practice:
As for the 2+ part questions, if you want them to select 1 you can use a RadioButton, or a DropDownList. If you want them to select more than one you can sue a CheckBoxList
A list of helpers and more can be found here Rendering a Form in ASP.NET MVC Using HTML Helpers
Finally here is a nice blog by ScottGu about the @ razor syntax with html helpers
Upvotes: 1