Question : get request url in asp.net core
Answered by : sandeep-mvn
using Microsoft.AspNetCore.Http.Extensions;
var url = httpContext.Request.GetEncodedUrl();
or
var url = httpContext.Request.GetDisplayUrl();
depending on the purposes.
Source : | Last Update : Thu, 15 Apr 21
Question : get request url in asp.net core
Answered by : peter-ezzat
//get request url in asp.net core
using Microsoft.AspNetCore.Http.Extensions;
var url = httpContext.Request.GetEncodedUrl();
//or
var url = httpContext.Request.GetDisplayUrl();
//or
var url = HttpContext.Current.Request.Url.AbsoluteUri;
Source : https://www.codegrepper.com/code-examples/csharp/get+request+url+in+asp.net+core | Last Update : Wed, 04 May 22