This article is a mirror article of machine translation, please click here to jump to the original article.

View: 26823|Reply: 2

[.NET Core] ASP.NET Core gets the relative path to the current URL

[Copy link]
Posted on 2020-9-19 12:58:33 | | | |
In ASP.NET, you can get the relative path of the current link through Request.RawUrl, and attach a parameter, in .NET Core, how do you get the relative path with parameters?

ASP.NET

In asp.net, it is written as follows:


ASP.NET Core

ASP.NET Core is written as follows:


Requires reference to the AspNetCore extension class.


Source link:

The hyperlink login is visible.

The renderings are as follows:





Previous:ASP.NET Prohibit access to log files in the form of URLs
Next:Failed to find a workaround for part of the path "\bin\roslyn\csc.exe"
Posted on 2022-3-29 17:58:02 |
Recently, many of the methods of core cashback have disappeared
 Landlord| Posted on 2022-3-31 10:01:58 |
ASP.NET Core 6 Code:

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com