title: DisplayNameFor Class Inside Class MVC
body: <p>Consider I have 2 class for example:</p>
  
  <pre><code>Class ClsStudent
     Public Id As System.Nullable(Of Integer)
  
     &lt;Required(AllowEmptyStrings:=False)&gt; _
     &lt;StringLength(45, ErrorMessage:="Name must not exceed 45 characters.")&gt; _
     &lt;Display(Name:="Full Name", Description:="Student full name.")&gt; _
     Public Name As String = ""
  End Class
  
  Class Voila
     Public Student As ClsStudent
     Public Status As Boolean
  End Class
  </code></pre>
  
  <p>I pass the voila to the view and would like to access the DisplayNameFor of the student name in the view:</p>
  
  <pre><code>@Html.DisplayNameFor(Function(m) m.Student.Name)
  </code></pre>
  
  <p>But it shows the field name : "Name" instead of the display name attribute that has been assigned to it "Full Name".</p>
  
  <p>What's wrong with my code?</p>