Get the Absolute URI from ASP.NET MVC Content or Action.
How to Get the Base URL in ASP.NET MVC Core View ?
ASP.NET MVC Core get website link in View .
Answer to above questions when i was trying to find what i actually wanted is below .
@Url.Action(<action>,<controller>,null,Context.Request.Scheme)
You can replace the <action> and <controller> with your values in double quotes if you want to get the exact link of a action method .
It will generate a link like - http://www.clanstech.com/Home/Services
Or you can also ignore <action>, <controller> altogether to get just the base url , website link , domain link on which you are hosting your website application .
Like this @Url.Action(null,null,null,Context.Request.Scheme)
It will generate a link like - http://www.clanstech.com/
f51cd8a0-2321-4908-9c1b-4b9c4f463ac5|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
ASP.NET MVC, ASP.NET MVC Core, C#
Absolute Uri, Base URL, website link, View, ASP.NET MVC Core View, Url.Action