停止的Response.Redirect从编码 [英] stop Response.Redirect from encoding

查看:190
本文介绍了停止的Response.Redirect从编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本的Response.Redirect后生成的URL字符串引起我们头疼。它与URL%的编码字符替换的字符和额外的文件目录添加。

The URL string generated after this response.redirect is causing us a headache. It is replacing the characters with url percent encoding characters and adding in extra file directories.

Response.Redirect("TestingReport.aspx?id=" + Request.QueryString("id") + "&Test_Type_ID=" + Request.QueryString("Test_Type_ID") + "&TType=" + Request.QueryString("TType"))

<一个href="https://subdomain.domain.com/User%20Portal/Testing/%2fUser%2520Portal%2fTesting%2fTestingReport.aspx%3fid%3d8444%26Test_Type_ID%3d2%26TType%3dCore%20Mandatory%202" rel="nofollow">https://subdomain.domain.com/User%20Portal/Testing/%2fUser%2520Portal%2fTesting%2fTestingReport.aspx%3fid%3d8444%26Test_Type_ID%3d2%26TType%3dCore%20Mandatory%202

为什么会改变?并且=到百分之codeS?我不明白为什么它被附加用户门户/测试两次,无论是。

Why is it changing ? and = to the percent codes? I don't understand why it is appending User Portal/Testing twice either.

感谢

推荐答案

这就是所谓的 URL编码。结帐这个在线工具脱code你的字符串。 在.NET中,你可以使用 System.Web.HttpUtility 来恩code /德code。

It's called URLEncoding. Checkout this online utility to decode the string you have. In .NET, you can use System.Web.HttpUtility to encode/decode.

这篇关于停止的Response.Redirect从编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆