GiovanS
0
Q:

asp.net core get root url in view

Request.Url.GetLeftPart(UriPartial.Authority) + Url.Content("~")
0
FOR ASP.NET CORE:
public WhateverController(IHttpContextAccessor context) //In the constructor
{
  var request = context.HttpContext.Request;
  var _baseURL = $"{request.Scheme}://{request.Host}"; // http://localhost:5000
}
0

New to Communities?

Join the community