By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,403 Members | 1,670 Online
Bytes IT Community
Submit an Article
Got Smarts?
Share your bits of IT knowledge by writing an article on Bytes.

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

P: 17
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.         });
  6.  
  7.  
Mar 31 '20 #1
Share this Article
Share on Google+
1 Comment


P: 37
In the end I used attribute routing: https://blogs.msdn.microsoft.com/web...asp-net-mvc-5/
Apr 4 '20 #2