hi all i am try to make a dropdown list using enum values. I have a select field in to my html page like,
<select name="Mem_BloodGr" >
<option value="A+">A+</option><option value="A-">A-</option>
<option value="B+">B+</option><option value="B-">B-</option>
<option value="O+">O+</option><option value="O-">O-</option>
<option value="AB+">AB+</option><option value="AB-">AB-</option>
</select>
This is repeated in many places in my web page. So i am try to generate dropdown list using enum values
namespace .....Models
{
public class MemberData
{
public int Id { get; set; }
public string Mem_NA { get; set; }
........
public BloodGroup Mem_BloodGr { get; set; }
}
public enum BloodGroup
{
A+, //// **error shows here like, "} expected"**
A-,
B-,
B+
}
}
but i got an error when adding enum values . Can anybody please help me.And is that the right way to creating this type dropdown list or any other easy ways in MVC4???