I know that the maximum length of a querystring varies by browser. Internet Explorer can have a maximum of 2048 characters.
If I perform a URLEncode in my code, will those encoded characters be taken as extra characters?
For example, suppose I have two textboxes. Before passing the values of the textboxes through the querystring, I perform HttpUtility.UrlEncode(TextBox2.Text)
and then I pass those textbox values to another webpage through the querystring.
Suppose the URL may look like this: WebForm2.aspx?Username=Kutti&Password=Pa%26%26word
.
Will that encoded thing, %26%26
has been taken as extra characters in the URL?
In other words, will it take Pa%26%26word
as same characters in Pa&&word
?
Yes, each character will be counted, even if it is arise due to encoding.
A suggestion for good code and security. Always try to limit your password till login page. Check the user's credentials and move on with some session variable for page to page authentication and authorization. Never pass password in the url, I would not even pass by userId.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With