Hi @Hadis Sulejmani ,
Why you don't use @azzedinehtmlsql .DropDownListFor? It's easy for drop downs.
Just like this:
@Html.DropDownListFor(m => m.StudentGender,
new SelectList(Enum.GetValues(typeof(Gender))),
"Select Gender")
public class Student
{
public int StudentId { get; set; }
public string StudentName { get; set; }
public Gender StudentGender { get; set; }
}
public enum Gender
{
Male,
Female
}
Do you just only want to use @azzedinehtmlsql .EditorFor?
Best regards,
Yijing Sun
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.