c# - ASP.NET MVC - Display name for the whole model -


i know there's displayname , display model properties :

public class mymodel {     [display(name = "licence")]     public string licence { get; set; } } 

but there display whole model ? may :

[display(name = "my beautiful model")] public class mymodel { ... 

and if so, how access html ?

you add property model called title , in set so

public string pagetitle {         {         return "attribut de licence";     } } 

this work. quite crude, don't think can add display attribute model itself.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -