X

Enum to JavaScript

Posts introducing some ideas about how to get C# enums to JavaScript on ASP.NET Core.

ASP.NET Core: Converting C# enums to JavaScript

In my previous posts about enums I covered how to convert C# enums to JavaScript on classic ASP.NET MVC. This blog post introduces how to do it on ASP.NET Core using simple view component.

ASP.NET Core: Building enum provider to convert C# enums to JavaScript

My previous post about ASP.NET Core and getting C# enums to JavaScript was primitive and used simple attribute on enums to detect ones we need in JavaScript. This blog post extends the idea and makes some generalizations to support also those enums that are located in the libraries we don’t control or on what we don’t want to apply attribute.

Converting multiple C# enums to JavaScript

My last solution to turn C# enums to JavaScript was simple but needed some additional work to support multiple enums better. After some playing with different approaches I found simple one that works okay for me. This blog post describes my simple solution that turns multiple C# enums to JavaScript with one shot.