Category: CTH

  • Country Tag Helper–part 5

    Now the Country Tag Helper supports .NET Standard 2.0 . This means that support .NET Core 2.0 . Also,I have made a NuGET package in order to install on every .NET Core 2.0 application with explanations: https://www.nuget.org/packages/CountryTagHelper  The only trouble here was to add references and make documentation in VS2017 about package ( see https://docs.microsoft.com/en-us/nuget/guides/create-net-standard-packages-vs2017…

  • Country Tag Helper–part 4

      Now I want to see somewhere in order to prove it Ii s right. I choose https://appharbor.com/ because it is free – and can not beat free for free source. I made github integration and modify the .csproj file accordingly to https://support.appharbor.com/discussions/problems/90387-is-net-core-supported-yet  The result is at http://countrytaghelper.apphb.com/  Also,I have to modify the code source…

  • Country Tag Helper – part 3

    Adding empty item – easy peasy. Just append "<option selected style=’display: none’ value=”></option>";   For getting the IP,I was trying to balance the 2 variants: downloading GeoIP database (https://dev.maxmind.com/geoip/geoip2/geolite2/) or calling http://freegeoip.net/ . I do call http://freegeoip.net/ – and the next point is to use Dependency Injection … or a provider to do that. For…

  • CountryTagHelper–part 2

    Finally,I have arrived at functionality. I said that I want something like <select asp-country="true" asp-country-selected="US" >     </select>   The functionality is very easy to be added: The entire class is :   The important thing is that it works with other html attributes,like <select asp-country="true" asp-country-selected="US" disabled=”disabled”>     </select>   What it remains to…

  • Country tag helper–part 1

      What I want to do is to create a Country Tag Helper for asp.net core. Something like <select asp-country=”true” and then list all countries in this select. More,it should be localized ( Germany vs Allemagne). That means 1 or more resource files    First I need initial data: The WorldBank API gives us the…