When encoding a string in ASP.NET, I use the function Server.UrlEncode(GAE?)
, which results in the string GAE%3f
.
However, when using the JavaScript function encodeURIComponent(GAE?)
, the result is GAE%3F
.
Unfortunately, the validation of the string fails because of this mismatch. Is there a way to encode encodeURIComponent(GAE?)
as GAE%3f
to meet my requirement?
Alternatively, if the encoding of Server.UrlEncode
is causing the issue by capitalizing the letter 'F', is there a way to ensure it is in lowercase when using encodeURIComponent(GAE?)
? The question mark (?
) is currently encoded as %3F
, but it should be %3f
.