How to set textbox width from mvc3 model , suppose my model is following ,
public class MVCMODEL
{
[Required]
public int Name{ get; set; }
}
i want that when this textbox renders in view its width will be 800px how to add custom styles in model ?
Thanks ,
You can’t do this from a model. In MVC, a model is a representation of the data structure that corresponds to the information you are sending to and from the page. The very point of MVC is to separate the aesthetics of the site from the logic that actually makes it run. In order to set visual aspects of a view you need to alter the view’s CSS.