I know this is an old question that has already been answered on StackOverFlow. However, none of those answers is working here. I can't apply CSS on any of my html helpers.
My HTML:
@Html.TextBox("Origin", new { @class = "MyInputClass" })
My CSS:
.MyInputClass
{
width:300px;
}
Instead of getting a 300px width textbox, I get a textbox with the text: { class = MyInputClass }
if I try instead:
@Html.TextBox("Origin", "123", new { @class = "MyInputClass" })
Then I'll get a textbox with the text "123" but with the default width...
.MyInputClass?