Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: flip sprite in unity 
Csharp :: add row count devepxress report 
Csharp :: unity new vector3 
Csharp :: c# multiline comment 
Csharp :: c sharp thread lambda 
Csharp :: initialize list in c# 
Csharp :: read excel to object c# 
Csharp :: what is the meaning of ?? in c# 
Csharp :: how to get text from textbox in windows form c# 
Csharp :: c# main 
Csharp :: getmousebuttondown unity 
Csharp :: c# convert double to int 
Csharp :: Convert array of strings to List<string 
Csharp :: unity c# get direction of object 
Csharp :: check if file exist c# 
Csharp :: unity editor script 
Csharp :: webclient timeout 
Csharp :: sorting a list of objects in c# 
Csharp :: new ienumerable 
Csharp :: system linq c# 
Csharp :: c# get certain character from string 
Csharp :: how to check type c# 
Csharp :: .net core partial view with model 
Csharp :: How to make game object transparent in unity 
Csharp :: c# remove item from list 
Csharp :: how to acivate a game object unity 
Csharp :: test how catch exception c# 
Csharp :: get controller name from ActionExecutingContext .net 4.x 
Csharp :: list min and Max value in c# 
Csharp :: ray casting unity 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =