ASP.NET Core/Razor Pages localize nested classes

You probably already know how to localize regular classes in ASP.NET Core web app. It’s rather easy, at least in terms of resource files. Sometimes however we use nested classes which requires special way of naming RESX files. As it turns out it is actually pretty easy to do. If you want the answer right away, then here it is. You have to use + sign in the name of your resource file (like this: OuterClass+NestedClass.en.resx). ...

September 22, 2019 · 2 min · Zbigniew

ASP.NET Core: extending built-in tag helpers

In this post I’ll show you how you can extend built-in tag helpers. What are tag helpers? Basically tag helpers are classes which take part in processing (or creating) HTML elements inside Razor views. You can create C# code which will target desired HTML and produce desired output. For more throughtout explanation see Introduction to Tag Helpers in ASP.NET Core Setup Before we begin, make sure that your setup is correct. If your custom tag helpers are in Solution assembly then you need to add this line to your View/_ViewImports.cshtml file: ...

February 9, 2018 · 3 min · Zbigniew