Why is the comma URL encoded?

前端 未结 4 1988
暖寄归人
暖寄归人 2020-12-09 08:14

When debugging in ASP.NET MVC, I don\'t see a difference between:

http://mysite.com?q=hi,bye

and

http://mysite.com?q=hi%2Cb         


        
4条回答
  •  孤街浪徒
    2020-12-09 09:05

    there are several characters that hold special meaning(like + ? # etc) or are directly not allowed(like space, comma etc) in a URL. to use such characters in a URL, u need to encode and decode them. Read more Here

    ASP.NET automatically encodes and decodes all required characters like this so u need not worry about them.

提交回复
热议问题