title: Make all form fields readonly in MVC
body: <p>I am displaying 3 or more versions of a form.  One version is an edit form to edit all fields.  A second version will be a read only version of the same form which will be used to show all the same fields but with all fields having readonly="true" on the client side so that the user cannot enter data. The readonly fields need to use a different css style. This is to display archived data. I am already hiding the submit button so they can't submit but I want the form to look like it is readonly.  A third version will have some fields readonly and some editable for a particular class of users that has limited editing privileges.</p>
  
  <p>I am using ASP.NET MVC 1.0. How do I modify all (or a subset) of the fields displayed so they are readonly.  I would like to iterate through the collection of fields in the controller and set them all to readonly and also set the correct css class.  I don't want to have to put an if statement on every field in the .aspx file (there are 40-50 fields) and I'd prefer not to have this on client side so I can prevent users from modifying javascript/html to edit things they are not supposed to.</p>
  
  <p>TIA,</p>
  
  <p>Steve Shier</p>