views:

1377

answers:

1

I am using the Html.TextBox helper method to generate a textbox against my model but when i pass in an anonymous htmlAttributes class with @class defined like below, the class is never assigned. Am I doing something wrong? I have assigned a readonly attribute the same way and it worked.

<%= Html.TextBox("LastName", Model.LastName, new { @class = "width-600" })%>

Thoughts on what I am doing wrong?

UPDATE! I was making changes in the wrong view. This works fine. Make sure you are on the right view folks!

+2  A: 

I was making changes in the wrong view. This works fine. Make sure you are on the right view folks!

Adam Carr