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取掉了“+”
string a="1"+"-3";
a="1-3",
因为地址是个string
url = "../CrystalViewer.aspx?CRParms="+sLeft2+"";
一样的,还是会取掉的
@小柑: 你这个"+"是要做运算还是做什么?
@惯了算了厌了: 是字符串里的字符
@小柑: url = "../CrystalViewer.aspx?CRParms=+"+sLeft2+";
这样里面绝对有+号。绝对不会没有!
@惯了算了厌了:还是不行,我在传递前替换成‘/’,接受时在替换回来的
@小柑: 嗯。
URL地址从后台抛到前端时,会将" "转换为+号
同理在前端后将后台传出来的+号自动转换为" "
没遇见过这个问题,可以试试 string.Formate 函数