467,867 Members | 1,273 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Share your developer knowledge by writing an article on Bytes.

How To make URL in lowercase in Asp.Net Razor pages?

Suppose we want our URL in lowercase for that we need to code in ConfigureServices method where we can add a lowercase property in lowercase.

Expand|Select|Wrap|Line Numbers
  1. services.Configure<RouteOptions>(option =>
  2.         {
  3.             option.LowercaseUrls = true;
  4.             option.LowercaseQueryStrings = true;
  5.         });
Mar 31 '20 #1
  • viewed: 4557
1 Comment
In the end I used attribute routing: https://blogs.msdn.microsoft.com/web...asp-net-mvc-5/
Apr 4 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Mike | last post: by
4 posts views Thread by Kenneth Keeley | last post: by
3 posts views Thread by E | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.