Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

mvc display name

My class in c#
namespace Domain
{
    public class Principal
    {
        [Display(XmlName="FirstName")]
        public string firstName { get; set; }
 
     }
}

in my c# codes I would like to see
something like below:

generic.AddChild(doc, node,xmlName,"John Smiths");

is it possible?
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

generic you mentioned is XML? The question is not clear.
Avatar of ITsolutionWizard

ASKER

it is not about xml. I just want to extract the value from [Display(XmlName="FirstName")]
on my class.cs
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
[Display(XmlName="FirstName")]

Can you do above?
[Display(Name="First Name")] will be used for the mvc view
I hope to get customized name for other resources ....