Jul 08, 2019 09:50 AM|PatriceSc|LINK
As pointed there you can use https://docs.microsoft.com/en-us/dotnet/api/system.web.mvc.controller.json?view=aspnet-mvc-5.2 to just return the value
you want rather than a view.
For now it seems you are confusing returning a "raw" value or HTML markup. Or the problem is that you are trying to use a single action while you want to return two distinct things ? Then the simplest approach could be to create another action.