Problem: If you are working in Asp.Net Core application and would like to get the application Base Url to append a resource url like an image see solution below:
solution: @Url.Content("~/ResourceFile") #the outcome will be https://www.domainName/ResourceFile