0

I just wanted to be able for a user to select from a dropdown if their id number was a ssn or ein.

I created a Farm entity and I wanted the user to select from a dropdown using Datalist whether or not it was an EIN or SSN so I created a TPINType (taxpayer id # type) Entity and added it to AppConstants and to the Database and I am not sure if I am missing a data annotation or something but I can't get it to even populate the TPINType on the screen where someone would add their farm

    [UIHint("SelectListModel")]
    [DataMember]
    [Display(AutoGenerateField = false, Name = "TPIN Type")]
    public virtual TPINType TPINType { get; set; }
5
  • Show your relevant view markup. Commented Sep 20, 2023 at 15:19
  • what if I am using a ViewModel? Commented Sep 20, 2023 at 15:28
  • You already have shown your ViewModel code, we can't do much with what is given. Commented Sep 20, 2023 at 20:56
  • you should use enum class for that Commented Sep 22, 2023 at 5:01
  • I figured it out, I was missing an Object.cshtml file in our Shared/EditorTemplates, once I copied and pasted that file from another app everything rendered correctly. Commented Sep 22, 2023 at 16:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.