首页新闻找找看学习计划

页面传参怎么去掉"+"

0
悬赏园豆:5 [已关闭问题] 关闭于 2015-04-01 11:45

        url = "../CrystalViewer.aspx?CRParms=" + sLeft2;
        this.Response.Redirect(url);

 

        sLeft = this.Request.Params["CRParms"];
        strArray = sLeft.Split(';');


12M UPG,12M UPG   CP,18M UPG,18M UPG   CP,21M UPG,21M UPG   CP,6M UPG,6M UPG   CP,BBOM CHANGE ,BBOM NEW,BBOM RECON,EQUIPMENT ON,FTTH NEW,FTTH RECON,IPTV NEW,IPTV NEW DIY,IPTV STB COL,MIOTV W MIO ,MIOTV W RECO,MNP NEW,NEW 1YR PLAN,NEW CONNECTI,NO LINE,PREPAID TO P,SNBB NEW,SNBB RECON,UPGRADE,UPGRADE 0,UPGRADE 0 WI,UPGRADE 2,UPGRADE 2 WI,UPGRADE WITH


12M UPG,12M UPG + CP,18M UPG,18M UPG + CP,21M UPG,21M UPG + CP,6M UPG,6M UPG + CP,BBOM CHANGE ,BBOM NEW,BBOM RECON,EQUIPMENT ON,FTTH NEW,FTTH RECON,IPTV NEW,IPTV NEW DIY,IPTV STB COL,MIOTV W MIO ,MIOTV W RECO,MNP NEW,NEW 1YR PLAN,NEW CONNECTI,NO LINE,PREPAID TO P,SNBB NEW,SNBB RECON,UPGRADE,UPGRADE 0,UPGRADE 0 WI,UPGRADE 2,UPGRADE 2 WI,UPGRADE WITH

为什么获取后的string取掉了“+”

 

小柑的主页 小柑 | 初学一级 | 园豆:14
提问于:2014-11-13 11:52
< >
分享
所有回答(3)
0

string   a="1"+"-3";

a="1-3",

因为地址是个string

 

url = "../CrystalViewer.aspx?CRParms="+sLeft2+"";

贫民窟大侠 | 园豆:4270 (老鸟四级) | 2014-11-13 11:57

一样的,还是会取掉的

支持(0) 反对(0) 小柑 | 园豆:14 (初学一级) | 2014-11-13 12:52

@小柑: 你这个"+"是要做运算还是做什么?

支持(0) 反对(0) 贫民窟大侠 | 园豆:4270 (老鸟四级) | 2014-11-13 13:44

@惯了算了厌了: 是字符串里的字符

 

支持(0) 反对(0) 小柑 | 园豆:14 (初学一级) | 2014-11-13 14:02

@小柑: url = "../CrystalViewer.aspx?CRParms=+"+sLeft2+";

这样里面绝对有+号。绝对不会没有!

支持(0) 反对(0) 贫民窟大侠 | 园豆:4270 (老鸟四级) | 2014-11-13 14:29

@惯了算了厌了:还是不行,我在传递前替换成‘/’,接受时在替换回来的

支持(0) 反对(0) 小柑 | 园豆:14 (初学一级) | 2014-11-13 14:40

@小柑: 嗯。

支持(0) 反对(0) 贫民窟大侠 | 园豆:4270 (老鸟四级) | 2014-11-13 16:25
0

URL地址从后台抛到前端时,会将" "转换为+号

同理在前端后将后台传出来的+号自动转换为" "

啸飛同学 | 园豆:133 (初学一级) | 2014-11-13 16:45
0

 没遇见过这个问题,可以试试 string.Formate 函数

jerry128 | 园豆:31 (初学一级) | 2014-11-13 21:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册