Print the absolute url in an Aspnetcore view

Asked

Viewed 50 times

0

I’m starting to work with Aspnetcore, and I’m having a hard time printing the absolute url of my project. I come from PHP and look for something similar to the code below, written in PHP:

<?php echo $_SERVER['HTTP_HOST'];

Any idea?

1 answer

1


You have to separate the host and the path in your View, follow the code.

@[email protected]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.