i have enum
public enum TypeImage
{
Img=0,
Thumb=1
}
i want in view show <%= TypeImage.Img %> -it shows "img" but not 0. what the problem?
i have enum
public enum TypeImage
{
Img=0,
Thumb=1
}
i want in view show <%= TypeImage.Img %> -it shows "img" but not 0. what the problem?
To show 0 you need to cast enum to integer:
<%= (int)TypeImage.Img %>