mvc get base url
Request.Url.GetLeftPart(UriPartial.Authority) + Url.Content("~")
mvc get base url
Request.Url.GetLeftPart(UriPartial.Authority) + Url.Content("~")
asp.net core get root url in view
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
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us