@Html.EditorFor(model => model.Screen.Description)
How to add a class or some other attributes to the generated input?
The built-in editor template is too general (it can display arbitrary objects) for such a concept to make sense. You can either
If this is the only property you are showing, you can use a more specific helper method like Html.TextBoxFor() :
Html.TextBoxFor()
@Html.TextBoxForm(m => m.Screen.Description, new { @class = "myClass" })
Source: https://habr.com/ru/post/1338800/More articles:referring to url as src = "//www.example.com/blah.js" - javascriptHow can I receive SMS / phone events and act on them before sending them to system applications? - objective-cHow to set up a graphics card that supports stereo to display stereo images? - stereoscopyUsing Apache ActiveMQ with C / C ++ - c ++Updating properties of an ObservableCollection using the INotifyPropertyChanged method - c #Cast object without more information than its System.Type - genericsIs this ajax behavior normal, safe - javascriptRecord and play an audio stream using Qt - qtcalling member functions from one member function of the same class in C ++, objective C - c ++How to check if cross-domain requests are disabled - securityAll Articles