Question

I have tried:

@Html.TextBoxFor(m => m.UserName, new {@class='textbox'})

which isn't working.

Was it helpful?

Solution

@Html.TextBoxFor(m => m.UserName, new {@class="textbox"})

A c# string literal does not take single quotes.

'textbox' -> "textbox"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top