Asp.net-mvc – ASP.NET MVC Html.TextBox @class = “MyClass” not working

asp.net-mvchtml-helper

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!

Best Solution

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