1

From the here I get to know about the case sensitivity of the query string keys. But my query is regarding the case sensitivity the query string value. Is it possible to make the query string values case insensitive? Can it be possible to get same result when i hit the below two urls?

http://eventabc.com/test/#/?layout=1&name=WCC 

and

http://eventabc.com/test/#/?layout=1&name=wcc 

If there is any way please give me some solution in angularjs.

Abhiz
  • 970
  • 1
  • 16
  • 36

1 Answers1

2

If you are using IIS express, Whenever you provide uppercase in query string the URL is automatically converted to lower case. Because this is happened in IIS express.

So you need to move hosted project to local IIS instead of IIS express, and the automatic lowercase redirect is gone

Please find this discussion: Angular 2 Route Param automatically converting to lowercase on localhost but remains capitalized on server

If you want to know the value is uppercase or lowercase, then please try this below way

if (value== value.toLowerCase())
{
  // The character is lowercase
}
else
{
  // The character is uppercase
}
Ramesh Rajendran
  • 37,412
  • 45
  • 153
  • 234
  • 1
    This concept help me and i resolved my issue.Thanks. I just compared value.toLowerCase() with anotherValue.toLowercase() . – Abhiz Apr 30 '19 at 10:31