How do I specify attributes for a Html.TextBox helper while maintaining the value retrieval from ViewData?

[EDIT] After looking at the source code, it appears that all you need to do is specify the value as null in the signature that takes a name, value, and htmlAttributes. If the value is null, it will attempt to use the value from the ViewData.

Html.TextBox( "name", null, new { @class = "css-class" } );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)