I am currently developing a registration page. When user already exists I want to provide login and reset password links for user in error message for email field. In contro
Found this post while figuring this out myself using ASP.NET Core.
What I ended up doing was adding my part of my validation message in modelstate.AddError(), and separately adding to ViewData the bit that had the Html I wanted to render, like so:
ViewData["myKey"]= "My html";
It feels pretty ugly and there's probably better ways of doing it, but for my very limited needs, this fit the bill nicely.