AFAIK the ReadOnlyAttribute is for property of class. From MSDN
Members that are marked with the ReadOnlyAttribute set to true or that do not have a Set method
cannot be changed. Members that do not have this attribute or that are marked with the
ReadOnlyAttribute set to false are read/write, and they can be changed. The default is No.
So you use this inside your classes to prevent modification to the properties. (at least the meaning I give to that attribute)
If you want a textbox readonly use something like that
@Html.TextBox("MyText", "my text", new { @readonly="readonly" })
the @ first of readonly tell the compiler to bybass the reserved word