在查询字符串中使用Base64编码参数发出

问题描述:

I'm sending a link in my web application to users mails (for confirming user registration) as the following :

< a target =_ blankhref =http:// localhost:2817 / ConfirmRegistration?confirm = Y0tcmGepe7wjH7A1CT1IaA ==>
http:// localhost:2817 / ConfirmRegistration?confirm = Y0tcmGepe7wjH7A1CT1IaA ==
< / a>

<a target="_blank" href="http://localhost:2817/ConfirmRegistration?confirm=Y0tcmGepe7wjH7A1CT1IaA=="> http://localhost:2817/ConfirmRegistration?confirm=Y0tcmGepe7wjH7A1CT1IaA== </a>

但Chrome会提示此消息:


But Chrome alert this message :

查询字符串是否无效?如何解决它?

Is the query string invalid ? How can I resolve it ?

BTW:

我的应用程序是C#和MVC3的

BTW:
My application is in C# and MVC3

您应该对确认参数进行URL编码。您收到的错误是因为最后一个 == 片段。

You should URL encode the confirm parameter. The error you get is because of the last == fragment.

对于此用途 HttpServerUtility.UrlEncode 或类似的框架方法。

For this use HttpServerUtility.UrlEncode or similar framework methods.